<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4556420708376409331</id><updated>2011-11-27T15:39:02.094-08:00</updated><title type='text'>Infragistics UltraWebGrid Control Discussions.Ultrawebgrid.blogspot.com offers ultrawebgrid asp.net</title><subtitle type='html'>ultrawebgrid.blogspot.com offers ultrawebgrid asp.net controls infragistics framework csharp C# VB programming webgrid visual studio sql server</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>24</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-7868499940689086696</id><published>2009-06-01T18:44:00.001-07:00</published><updated>2009-06-01T18:44:23.806-07:00</updated><title type='text'>How to have FilterRow functionality in the UltraWebGrid when handling its server-side Click event</title><content type='html'>&lt;!– google_ad_section_start –&gt;&lt;br /&gt;&lt;!– google_ad_section_end –&gt;&lt;br /&gt; When trying to use the UltraWebGrid’s FilterRow functionality, if you are handling its server-side Click event, you will not get the functionality you expect. When a cell in the FilterRow is clicked, the grid posts back, the cell loses focus, and the FilterRow drop down never appears. The way around this is to handle the client-side click event for the grid and cancel the postback if a cell in the filter row is clicked.&lt;br /&gt;Additional Information&lt;br /&gt;&lt;br /&gt;First set the UltraWebGrid’s AllowRowFiltering property to OnClient and its FilterUIType property to FilterRow.&lt;br /&gt;In C#:&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands[0].FilterOptions.AllowRowFiltering = Infragistics.WebUI.UltraWebGrid.RowFiltering.OnClient;&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands[0].FilterOptions.FilterUIType = Infragistics.WebUI.UltraWebGrid.FilterUIType.FilterRow;&lt;br /&gt;&lt;br /&gt;In VB.Net:&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands(0).FilterOptions.AllowRowFiltering = Infragistics.WebUI.UltraWebGrid.RowFiltering.OnClient&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands(0).FilterOptions.FilterUIType = Infragistics.WebUI.UltraWebGrid.FilterUIType.FilterRow&lt;br /&gt;&lt;br /&gt;A DataKey must be set so that the UltraWebGrid can distinguish between the FilterRow and a regular GridRow:&lt;br /&gt;In C#:&lt;br /&gt;UltraWebGrid1.DataKeyField = "CustomerID";&lt;br /&gt;&lt;br /&gt;In VB.Net:&lt;br /&gt;UltraWebGrid1.DataKeyField = "CustomerID"&lt;br /&gt;&lt;br /&gt;Add a client-side handler for the UltraWebGrid’s CellClick event and check for a DataKey to allow postback:&lt;br /&gt;In Javascript:&lt;br /&gt;function UltraWebGrid1_CellClickHandler(gridName, cellId, button){&lt;br /&gt;    var rowObj = igtbl_getRowById(cellId);&lt;br /&gt;    if( rowObj != null )&lt;br /&gt;    {&lt;br /&gt;        if( rowObj.getDataKey() == null )&lt;br /&gt;        {&lt;br /&gt;            igtbl_cancelPostBack(rowObj.gridId)&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-7868499940689086696?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/7868499940689086696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=7868499940689086696' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/7868499940689086696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/7868499940689086696'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2009/06/how-to-have-filterrow-functionality-in.html' title='How to have FilterRow functionality in the UltraWebGrid when handling its server-side Click event'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-4774533675058365707</id><published>2009-06-01T18:41:00.000-07:00</published><updated>2009-06-01T18:42:12.555-07:00</updated><title type='text'>How to move columns</title><content type='html'>&lt;!– google_ad_section_start –&gt;&lt;br /&gt;&lt;!– google_ad_section_end –&gt;&lt;br /&gt; If you want the columns of data in your grid to be in a different order from the order in which it resides in the database, you must manually move the columns.&lt;br /&gt;Additional Information&lt;br /&gt;&lt;br /&gt;Open a project that has a grid on it. The "Bind to a DataTable" tutorial is a good place start if you don't have any other projects. Add an ASP button in the design view, and double click it to see the code-behind.&lt;br /&gt;&lt;br /&gt;In the button's "click" event add this code:&lt;br /&gt;VB:&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands(0).Columns(2).Move(0)&lt;br /&gt;&lt;br /&gt;C#:&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands[0].Columns[2].Move(0);&lt;br /&gt;&lt;br /&gt;Run the project. Click the button, and a third column will be move to the first column, and the other columns will shift to the right.&lt;br /&gt;&lt;br /&gt;Since moving a column bumps all the columns over one, if you are moving muliple columns it is a good idea to start with whichever one you want to appear leftmost. For example:&lt;br /&gt;VB:&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands(0).Columns.FromKey("SomeColumn").Move(0)&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands(0).Columns.FromKey("NextColumn").Move(1)&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands(0).Columns.FromKey("AnotherColumn").Move(2)&lt;br /&gt;&lt;br /&gt;C#:&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands[0].Columns.FromKey("SomeColumn").Move(0);&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands[0].Columns.FromKey("NextColumn").Move(1);&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands[0].Columns.FromKey("AnotherColumn").Move(2);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-4774533675058365707?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/4774533675058365707/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=4774533675058365707' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/4774533675058365707'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/4774533675058365707'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2009/06/how-to-move-columns.html' title='How to move columns'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-8973036479703590331</id><published>2009-06-01T18:39:00.000-07:00</published><updated>2009-06-01T18:41:13.166-07:00</updated><title type='text'>How to change the width of columns in ultrawebgrid</title><content type='html'>&lt;!– google_ad_section_start –&gt;&lt;br /&gt;&lt;!– google_ad_section_end –&gt;&lt;br /&gt; At design-time, follow these steps:&lt;br /&gt;&lt;br /&gt;Click on the Columns collection in the property pages.&lt;br /&gt;Select the column you wish to change.&lt;br /&gt;Entering an Integer will set the width in pixels.&lt;br /&gt;Entering a % will set the width of the column to that percentage of the total size of the grid (example: 25% will set the column to be 25% of the total grid width).&lt;br /&gt;&lt;br /&gt;At run-time, use the following code.&lt;br /&gt;&lt;br /&gt;In VB.Net:&lt;br /&gt;&lt;br /&gt;UltraWebGrid1.Columns(0).Width = Unit.Pixel(100)&lt;br /&gt;UltraWebGrid1.Columns(0).Width = Unit.Percentage(33.3)&lt;br /&gt;&lt;br /&gt;In C#:&lt;br /&gt;&lt;br /&gt;UltraWebGrid1.Columns(0).Width = Unit.Pixel(100);&lt;br /&gt;UltraWebGrid1.Columns(0).Width = Unit.Percentage(33.3);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-8973036479703590331?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/8973036479703590331/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=8973036479703590331' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/8973036479703590331'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/8973036479703590331'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2009/06/how-to-change-width-of-columns-in.html' title='How to change the width of columns in ultrawebgrid'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-3628192350832423172</id><published>2009-06-01T18:36:00.000-07:00</published><updated>2009-06-01T18:38:31.419-07:00</updated><title type='text'>How to prevent a cell from being edited on the client in UltraWebGrid in javascript?</title><content type='html'>&lt;!– google_ad_section_start –&gt;&lt;br /&gt;&lt;!– google_ad_section_end –&gt;&lt;br /&gt;Here is a method for implementing the functionality of editing only certain cells when the column's AllowUpdate property is set to false. If you cancel the BeforeEnterEditMode event on the client by returning true, the user will not be able to edit that cell.&lt;br /&gt;&lt;br /&gt;First, add a handler for the client-side event BeforeEnterEditMode. This property can be set either in the Property Pages under displaylayout&gt;ClientsideEvents&gt;BeforeEnterEditMode or in code:&lt;br /&gt;&lt;br /&gt;UltraWebGrid1.DisplayLayout.ClientSideEvents.BeforeEnterEditModeHandler = "BeforeEdit"&lt;br /&gt;&lt;br /&gt;This event receives two parameters, gridname and cellid. You would return true to cancel the event which would stop the cell from being edited. The following script demostrates how to cancel the event for any row whose cell in column one ha a value of true.&lt;br /&gt;&lt;br /&gt;function BeforeEdit(gridname, cellid)&lt;br /&gt;{&lt;br /&gt;    //get the cell that is about to be edited    &lt;br /&gt;    var row=igtbl_getRowById(cellid);&lt;br /&gt;    //get the value for column 1 in the current row, gets the value by getting the cell's row object then goes into the row's cell array&lt;br /&gt;    var value=row.getCell(1).getValue();&lt;br /&gt;    //check if the value is true, if so then don't allow editing of the column, cancel event by returning true, else do nothing and allow editing&lt;br /&gt;    if(value==true)&lt;br /&gt;        {&lt;br /&gt;         return true;&lt;br /&gt;        }&lt;br /&gt;    //or in this case since we are basing the editing on the boolean value you could just say&lt;br /&gt;    //return value and omit the if statement.&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-3628192350832423172?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/3628192350832423172/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=3628192350832423172' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/3628192350832423172'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/3628192350832423172'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2009/06/how-to-prevent-cell-from-being-edited.html' title='How to prevent a cell from being edited on the client in UltraWebGrid in javascript?'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-425227720901246495</id><published>2008-12-03T11:46:00.000-08:00</published><updated>2008-12-15T12:01:50.634-08:00</updated><title type='text'>Prevent Editing In WebGrid Child Row Based On Value In Parent Row</title><content type='html'>&lt;span id="AdditionalInfo"&gt;To accomplish this, handle the BeforeEnterEditMode client-side event. Depending on the value of the parent row we can either cancel the event or allow it to continue.&lt;br /&gt;&lt;br /&gt;Example flow in pseudo-code for this implementation:&lt;br /&gt;1. Is the row a child row?  If so, we should check the value of one of the cells on the parent; if not, allow editing as normal.&lt;br /&gt;2. Examine the Value of a boolean cell in the parent row.&lt;br /&gt;3. If the Value is false, then cancel the event, so that edit mode is never entered.&lt;br /&gt;4. If the value is true, allow editing as normal.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="StepByStep"&gt;&lt;b&gt;In JavaScript:&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;function UltraWebGrid1_BeforeEnterEditModeHandler(gridName, cellId)&lt;br /&gt;{&lt;br /&gt;   var oRow = igtbl_getRowById(cellId);&lt;br /&gt;&lt;br /&gt;   if ((oRow.ParentRow != null) &amp;amp;&amp;amp; (oRow.ParentRow.getCell(3).getValue() == false))&lt;br /&gt;   {&lt;br /&gt;       // Return true to cancel the event.&lt;br /&gt;       return true;&lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;       // Return false to let processing continue uninterrupted&lt;br /&gt;       return false;&lt;br /&gt;   }&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-425227720901246495?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/425227720901246495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=425227720901246495' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/425227720901246495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/425227720901246495'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/prevent-editing-in-webgrid-child-row.html' title='Prevent Editing In WebGrid Child Row Based On Value In Parent Row'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-2060236112438637575</id><published>2008-12-03T11:45:00.000-08:00</published><updated>2008-12-15T12:02:30.533-08:00</updated><title type='text'>Make a WebGrid cell read-only in certain conditions</title><content type='html'>&lt;span id="StepByStep"&gt;&lt;i&gt;Server-Side:&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In the InitializeRow event, set AllowEditing property to "AllowEditing.No" after checking the condition. In this example, updates are forbidden for cells in the fourth column if the value is already greater than 5000:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;span style="font-size:130%;"&gt;private void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)&lt;br /&gt;{&lt;br /&gt;   if ((int) e.Row.Cells[3].Value &gt; 5000)&lt;br /&gt;   {&lt;br /&gt;       e.Row.Cells[3].AllowEditing = Infragistics.WebUI.UltraWebGrid.AllowEditing.No;&lt;br /&gt;   }&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;i&gt;Client-Side:&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Disable editing on the cell in the BeforeEnterEditMode client-side event handler by canceling the event (returning a value of "true") after checking the condition. In this example, updates are forbidden for cells that belong in the "Dept" column whose value is not "Finance":&lt;br /&gt;&lt;br /&gt;&lt;b&gt;In JavaScript:&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;span style="font-size:130%;"&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;function UltraWebGrid1_BeforeEnterEditModeHandler(gridName, cellId)&lt;br /&gt;{&lt;br /&gt;   var c = igtbl_getCellById(cellId);&lt;br /&gt;&lt;br /&gt;   if (c.Column.Key == "Dept" &amp;amp;&amp;amp; c.getValue() != "Finance")&lt;br /&gt;   {&lt;br /&gt;   return true;&lt;br /&gt;   }&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-2060236112438637575?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/2060236112438637575/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=2060236112438637575' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/2060236112438637575'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/2060236112438637575'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/make-webgrid-cell-read-only-in-certain.html' title='Make a WebGrid cell read-only in certain conditions'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-3851828090586255641</id><published>2008-12-03T11:44:00.000-08:00</published><updated>2008-12-15T12:03:03.462-08:00</updated><title type='text'>Retrieve value of the selected rows in WebCombo on the client</title><content type='html'>&lt;span id="StepByStep"&gt;Accessing the selected rows in a WebCombo requires accessing its underlying WebGrid control. The following example uses the AfterSelectChange client-side event of the WebCombo to get the selected row's cell values, and displays each value in an alert() dialog.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="StepByStep"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="StepByStep"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="StepByStep"&gt;&lt;b&gt;In JavaScript:&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size:130%;"&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;function WebCombo1_AfterSelectChange(webComboId)&lt;br /&gt;{&lt;br /&gt;   // get the combo from the passed-in id&lt;br /&gt;   var combo = igcmbo_getComboById(webComboId);&lt;br /&gt;&lt;br /&gt;   // get the currently selected row in webcombo&lt;br /&gt;   var index = combo.getSelectedIndex();&lt;br /&gt;&lt;br /&gt;   // get grid reference from webcombo&lt;br /&gt;   var grid = combo.getGrid();&lt;br /&gt;&lt;br /&gt;   // get selected row in grid&lt;br /&gt;   var row = grid.Rows.getRow(index);&lt;br /&gt;&lt;br /&gt;   // get cell values in row&lt;br /&gt;   alert(row.getCell(0).getValue());&lt;br /&gt;   alert(row.getCell(1).getValue());&lt;br /&gt;   alert(row.getCell(2).getValue());&lt;br /&gt;   alert(row.getCell(3).getValue());&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="StepByStep"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-3851828090586255641?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/3851828090586255641/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=3851828090586255641' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/3851828090586255641'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/3851828090586255641'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/retrieve-value-of-selected-rows-in.html' title='Retrieve value of the selected rows in WebCombo on the client'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-2558464701153049727</id><published>2008-12-03T11:42:00.000-08:00</published><updated>2008-12-15T12:03:08.511-08:00</updated><title type='text'>Adding a Mutually Exclusive Radio Button Column to WebGrid</title><content type='html'>&lt;span id="StepByStep"&gt;&lt;b&gt;In JavaScript:&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;//This is used to activate the Grid Row whenever we click on a radio button&lt;br /&gt;function activateGridRow(theIndex){&lt;br /&gt;   igtbl_getGridById('UltraWebGrid1').Rows.getRow(theIndex).activate();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;As you notice, we are simply using the client side object model of the WebGrid to access a row at the specified Index. Once we access the Row, we will activate it.&lt;br /&gt;&lt;br /&gt;Now that we have some JavaScript to activate the Row, we need to somehow put Radio Buttons inside the cells of the WebGrid’s column that will be dedicated for this purpose.&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;private void UltraWebGrid1_InitializeLayout(object sender,&lt;br /&gt;   Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e)&lt;br /&gt;{&lt;br /&gt;   e.Layout.AllowSortingDefault = AllowSorting.Yes;&lt;br /&gt;   e.Layout.HeaderClickActionDefault = HeaderClickAction.SortSingle;&lt;br /&gt;&lt;br /&gt;   //add the Radio Button Column&lt;br /&gt;   e.Layout.Bands[0].Columns.Insert(0,"RADIO");&lt;br /&gt;   e.Layout.Bands[0].Columns.FromKey("RADIO").Header.ClickAction = HeaderClickAction.Select;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Now that we have added an unbound column and moved it into position so that it is the very first column in the WebGrid, we can Bind to some Data and then iterate through the Rows and add our HTML:&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;private void Page_Load(object sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;   if (this.IsPostBack)&lt;br /&gt;       return;&lt;br /&gt;&lt;br /&gt;   this.sqlDataAdapterProducts.Fill(this.dataSetNorthWind1.Products);&lt;br /&gt;   this.UltraWebGrid1.DataBind();&lt;br /&gt;&lt;br /&gt;   this.initRadioButtons(); //set up the Radio Buttons&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;private void initRadioButtons()&lt;br /&gt;{&lt;br /&gt;   if (this.UltraWebGrid1.Rows.Count &gt; 0)&lt;br /&gt;   {&lt;br /&gt;       //Add the HTML to create the radio button and connect the onclick event to our JavaScript&lt;br /&gt;       for (int i = 0; i &lt; value ="                 @" name="TheRadioGroup" onclick="'activateGridRow(" type="radio"&gt;";&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;private void UltraWebGrid1_SortColumn(object sender,&lt;br /&gt;   Infragistics.WebUI.UltraWebGrid.SortColumnEventArgs e)&lt;br /&gt;{&lt;br /&gt;   //Sorting throws off the Index, so set the radio buttons up again in this event&lt;br /&gt;   this.initRadioButtons();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Now that everything is set up, whenever the page loads, the WebGrid gets its data and we add and move the Radio Button column. Then we iterate through the rows and set the HTML for each cell that is part of the Radio Button Column. Now the user can click on each Radio Button in the Column and cause the entire row to be Activated.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-2558464701153049727?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/2558464701153049727/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=2558464701153049727' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/2558464701153049727'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/2558464701153049727'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/adding-mutually-exclusive-radio-button.html' title='Adding a Mutually Exclusive Radio Button Column to WebGrid'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-2319896528713319432</id><published>2008-12-03T11:41:00.001-08:00</published><updated>2008-12-15T12:03:14.312-08:00</updated><title type='text'>get rid of scrollbars and set maximum width and height in UltraWebGrid</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;this.ultraWebGrid1.Width = Unit.Percentage(100);&lt;br /&gt;this.ultraWebGrid1.Height = Unit.Percentage(100);&lt;br /&gt;this.ultraWebGrid1.DisplayLayout.FrameStyle.CustomRules = "table-layout:auto";&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-2319896528713319432?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/2319896528713319432/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=2319896528713319432' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/2319896528713319432'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/2319896528713319432'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/get-rid-of-scrollbars-and-set-maximum.html' title='get rid of scrollbars and set maximum width and height in UltraWebGrid'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-3569360209210114747</id><published>2008-12-03T11:39:00.000-08:00</published><updated>2008-12-15T12:03:31.019-08:00</updated><title type='text'>Copy selected rows from a WebGrid to Excel using the clipboard</title><content type='html'>&lt;span id="StepByStep"&gt;When copying from the clipboard to Excel, the default cell delimiter is a tab character ('\t'), while the row delimiter is the newline character ('\n'). Therefore, in Javascript, you can build a string of the cells and rows by iterating through the selected rows collection of the WebGrid, and inserting the proper delimiters as necessary. For this article, this functionality is wired to the standard key combination Ctrl-C, using a combination of the KeyDownHandler and KeyUpHandler client-side events:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="StepByStep"&gt;&lt;b&gt;In JavaScript:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;span style="font-size:130%;"&gt;var ctrlPressed = false;&lt;br /&gt;&lt;br /&gt;function UltraWebGrid1_KeyDownHandler(gridName, cellId, key)&lt;br /&gt;{&lt;br /&gt;   if (key == 17)&lt;br /&gt;       ctrlPressed = true;&lt;br /&gt;   else if (ctrlPressed &amp;amp;&amp;amp; key == 67)&lt;br /&gt;   {&lt;br /&gt;       var rowString = "";&lt;br /&gt;       var isFirstRow = true;&lt;br /&gt;       var grid = igtbl_getGridById(gridName);&lt;br /&gt;     &lt;br /&gt;       for (var rowId in grid.SelectedRows)&lt;br /&gt;       {&lt;br /&gt;           var row = igtbl_getRowById(rowId);&lt;br /&gt;&lt;br /&gt;           if (!isFirstRow)&lt;br /&gt;               rowString += '\n';&lt;br /&gt;&lt;br /&gt;           for (var i=0; i &lt; cell =" row.getCell(i);" isfirstrow =" false;" key ="="" ctrlpressed =" false;"&gt;&lt;br /&gt;&lt;/span&gt;Since there is no way to tell Excel to paste only into a certain column of a row using a delimiter, this functionality will only work correctly for selected rows.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-3569360209210114747?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/3569360209210114747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=3569360209210114747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/3569360209210114747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/3569360209210114747'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/copy-selected-rows-from-webgrid-to.html' title='Copy selected rows from a WebGrid to Excel using the clipboard'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-2585545041239948662</id><published>2008-12-03T11:37:00.000-08:00</published><updated>2008-12-15T12:03:43.451-08:00</updated><title type='text'>Display a progress bar inside a cell of a WebGrid</title><content type='html'>&lt;span id="AdditionalInfo"&gt;The WebGrid allows the injection of any type of any HTML object inside a cell, simply by setting the cell's Value property on the server to the desired HTML string. Further, the container for any such HTML element is the cell's rectangle; thus, we can set the width of such an HTML element as a percentage of the cell's width. With this in mind, we can use a "DIV" HTML element, set it's background color as desired, and set its width to the desired percentage of progress.&lt;br /&gt;&lt;br /&gt;To accomplish this, handle the InitializeLayout event of the WebGrid to add an unbound column, which will contain the simulated progress bar. Also, handle the InitializeRow event, where the HTML will be added to the cell of this column, with its width set as desired.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="StepByStep"&gt;Handle the InitializeLayout event of the WebGrid to set its layout properties. For this example, we will add an unbound column which the user is not allowed to update:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;span style="font-size:130%;"&gt;private void UltraWebGrid1_InitializeLayout(object sender, Infragistics.WebUI.UltraWebGrid.LayoutEventArgs e)&lt;br /&gt;{&lt;br /&gt;   // Configure the WebGrid so that it displays all its data,&lt;br /&gt;   // and so the user can update and resize the columns&lt;br /&gt;   this.UltraWebGrid1.Width = Unit.Empty;&lt;br /&gt;   this.UltraWebGrid1.Height = Unit.Empty;&lt;br /&gt;   this.UltraWebGrid1.DisplayLayout.TableLayout = Infragistics.WebUI.UltraWebGrid.TableLayout.Auto;&lt;br /&gt;   e.Layout.Bands[0].AllowUpdate = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes;&lt;br /&gt;   e.Layout.Bands[0].AllowColSizing = Infragistics.WebUI.UltraWebGrid.AllowSizing.Free;&lt;br /&gt;&lt;br /&gt;   // Add an unbound, not-updatable column to contain show the progress bar&lt;br /&gt;   e.Layout.Bands[0].Columns.Add("ProgressBar","Progress Bar");&lt;br /&gt;   e.Layout.Bands[0].Columns.FromKey("ProgressBar").AllowUpdate = Infragistics.WebUI.UltraWebGrid.AllowUpdate.No;&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Handle the InitializeRow event of the WebGrid to populate row-specific information that will be set at the time of data binding. For this example, we will determine the percentage value to use as the width of our progress bar, and use this to inject an HTML DIV element into the Progress Bar cell for this row:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;private void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)&lt;br /&gt;{&lt;br /&gt;   // Inject a DIV element inside the progress bar cell, using the value in&lt;br /&gt;   // the Completed column as the percentage width of the element&lt;br /&gt;   e.Row.Cells.FromKey("ProgressBar").Value = "&lt;div style="background-color: olive;"&gt;&lt;/div&gt;";&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-2585545041239948662?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/2585545041239948662/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=2585545041239948662' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/2585545041239948662'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/2585545041239948662'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/display-progress-bar-inside-cell-of.html' title='Display a progress bar inside a cell of a WebGrid'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-477876095476468067</id><published>2008-12-03T11:35:00.000-08:00</published><updated>2008-12-15T12:03:44.920-08:00</updated><title type='text'>Hiding and showing Add New buttons for specific Bands in WebGrid</title><content type='html'>&lt;span id="AdditionalInfo"&gt;To accomplish this, you will need to get a reference to the Add New Button element on the client. Once we have that reference, then it is just a matter of setting the "display" property to "none" as follows:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="AdditionalInfo"&gt;&lt;b&gt;In JavaScript:&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;//When the Grid initializes, you can use the ID that is&lt;br /&gt;&lt;br /&gt;//available in the Event Arguments to get the AddNew&lt;br /&gt;&lt;br /&gt;//button's Element. Once we get the Element, set the&lt;br /&gt;&lt;br /&gt;//Display type to "none"&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;function UltraWebGrid1_InitializeLayoutHandler(gridName){&lt;br /&gt;   //This is the naming convention for "Band 0 Add New":&lt;br /&gt;   var e = document.getElementById(gridName + '_an_0');&lt;br /&gt;&lt;br /&gt;   //Bands 1, 2, etc would be:&lt;br /&gt;   //var e = document.getElementById(gridName + '_an_1');&lt;br /&gt;   //var e = document.getElementById(gridName + '_an_2');&lt;br /&gt;&lt;br /&gt;   if(e){&lt;br /&gt;       e.style.display = 'none';&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-477876095476468067?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/477876095476468067/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=477876095476468067' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/477876095476468067'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/477876095476468067'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/hiding-and-showing-add-new-buttons-for.html' title='Hiding and showing Add New buttons for specific Bands in WebGrid'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-7673697479150125038</id><published>2008-12-03T11:33:00.001-08:00</published><updated>2008-12-15T12:03:48.791-08:00</updated><title type='text'>Add new rows to WebCombo in client-side javascript</title><content type='html'>&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;span style="font-size:130%;"&gt;Infragistics.WebUI.UltraWebGrid.UltraWebGrid comboGrid = (Infragistics.WebUI.UltraWebGrid.UltraWebGrid) this.WebCombo1.Controls[0];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; Then allow add new and updates to the WebGrid&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;span style="font-size:130%;"&gt;if(comboGrid != null)&lt;br /&gt;{&lt;br /&gt;   comboGrid.DisplayLayout.AllowAddNewDefault = Infragistics.WebUI.UltraWebGrid.AllowAddNew.Yes;&lt;br /&gt;   comboGrid.DisplayLayout.AllowUpdateDefault = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Write javascript to call the igtbl_addNew method to add a new row to the grid inside of the combo:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;function AddNewRow()&lt;br /&gt;{&lt;br /&gt;   var cbo = igcmbo_getComboById('WebCombo1');&lt;br /&gt;   var row = igtbl_addNew(cbo.grid.Id, 0);&lt;br /&gt;   row.getCell(0).setValue(11);&lt;br /&gt;   row.getCell(1).setValue("Name11");&lt;br /&gt;   row.getCell(2).setValue(new Date());&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-7673697479150125038?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/7673697479150125038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=7673697479150125038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/7673697479150125038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/7673697479150125038'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/add-new-rows-to-webcombo-in-client-side_03.html' title='Add new rows to WebCombo in client-side javascript'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-7701703060888700774</id><published>2008-12-03T11:33:00.000-08:00</published><updated>2008-12-15T12:04:07.286-08:00</updated><title type='text'>Add new rows to WebCombo in client-side javascript</title><content type='html'>&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;span style="font-size:130%;"&gt;Infragistics.WebUI.UltraWebGrid.UltraWebGrid comboGrid = (Infragistics.WebUI.UltraWebGrid.UltraWebGrid) this.WebCombo1.Controls[0];&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt; Then allow add new and updates to the WebGrid&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;span style="font-size:130%;"&gt;if(comboGrid != null)&lt;br /&gt;{&lt;br /&gt;   comboGrid.DisplayLayout.AllowAddNewDefault = Infragistics.WebUI.UltraWebGrid.AllowAddNew.Yes;&lt;br /&gt;   comboGrid.DisplayLayout.AllowUpdateDefault = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes;&lt;br /&gt;}&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Write javascript to call the igtbl_addNew method to add a new row to the grid inside of the combo:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:130%;"&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;function AddNewRow()&lt;br /&gt;{&lt;br /&gt;   var cbo = igcmbo_getComboById('WebCombo1');&lt;br /&gt;   var row = igtbl_addNew(cbo.grid.Id, 0);&lt;br /&gt;   row.getCell(0).setValue(11);&lt;br /&gt;   row.getCell(1).setValue("Name11");&lt;br /&gt;   row.getCell(2).setValue(new Date());&lt;br /&gt;}&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-7701703060888700774?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/7701703060888700774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=7701703060888700774' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/7701703060888700774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/7701703060888700774'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/add-new-rows-to-webcombo-in-client-side.html' title='Add new rows to WebCombo in client-side javascript'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-1445527293634193047</id><published>2008-12-03T11:28:00.000-08:00</published><updated>2008-12-15T12:04:10.638-08:00</updated><title type='text'>FilterRow functionality in the UltraWebGrid when handling its server-side Click event</title><content type='html'>&lt;span id="AdditionalInfo"&gt;First set the UltraWebGrid’s AllowRowFiltering property to OnClient and its FilterUIType property to FilterRow.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;span style="font-size:130%;"&gt;UltraWebGrid1.DisplayLayout.Bands[0].FilterOptions.AllowRowFiltering = Infragistics.WebUI.UltraWebGrid.RowFiltering.OnClient;&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands[0].FilterOptions.FilterUIType = Infragistics.WebUI.UltraWebGrid.FilterUIType.FilterRow;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;A DataKey must be set so that the UltraWebGrid can distinguish between the FilterRow and a regular GridRow&lt;br /&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;span style="font-size:130%;"&gt;UltraWebGrid1.DataKeyField = "CustomerID";&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;Add a client-side handler for the UltraWebGrid’s CellClick event and check for a DataKey to allow postback:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;In Javascript:&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;span style="font-size:130%;"&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;function UltraWebGrid1_CellClickHandler(gridName, cellId, button){&lt;br /&gt;   var rowObj = igtbl_getRowById(cellId);&lt;br /&gt;   if( rowObj != null )&lt;br /&gt;   {&lt;br /&gt;       if( rowObj.getDataKey() == null )&lt;br /&gt;       {&lt;br /&gt;           igtbl_cancelPostBack(rowObj.gridId)&lt;br /&gt;       }&lt;br /&gt;   }&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-1445527293634193047?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/1445527293634193047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=1445527293634193047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/1445527293634193047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/1445527293634193047'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/filterrow-functionality-in-ultrawebgrid.html' title='FilterRow functionality in the UltraWebGrid when handling its server-side Click event'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-1422031505609229740</id><published>2008-12-03T11:22:00.000-08:00</published><updated>2008-12-15T12:04:14.609-08:00</updated><title type='text'>use the WebCombo as a column editor in WebGrid</title><content type='html'>&lt;span id="AdditionalInfo"&gt; The WebDataInput controls can be used as editors for columns within the WebGrid, the EditorControlID property has been added to the column object. This property should be assigned the UniqueID of the control you wish to use an editor. In the following code, you will see that the ValueList.WebCombo property is no longer used and the EditorControlID should be utilized. The code below is placed within the Page_Load event and outlines all of the necessary steps for using a bound WebCombo as an editor for a column within a bound WebGrid. The Products and Categories table of the Northwind database serve as the respective datatables.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;font-size:130%;" &gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;br /&gt;&lt;br /&gt;if (! this.IsPostBack)&lt;br /&gt;{   //fill the adapters&lt;br /&gt;   this.oleDbDataAdapter1.Fill(this.dataSet11, this.dataSet11.Products.TableName);&lt;br /&gt;   this.oleDbDataAdapter2.Fill(this.dataSet11,this.dataSet11.Categories.TableName);&lt;br /&gt;   //set the datasource of the grid and databind&lt;br /&gt;   this.UltraWebGrid1.DataSource = this.dataSet11.Products;&lt;br /&gt;   this.UltraWebGrid1.DataBind();&lt;br /&gt;   //set the datasource and text and value fields of the combo... databind&lt;br /&gt;   this.WebCombo1.DataSource = this.dataSet11.Categories;&lt;br /&gt;   this.WebCombo1.DataTextField = this.dataSet11.Categories.CategoryNameColumn.ColumnName;&lt;br /&gt;   this.WebCombo1.DataValueField = this.dataSet11.Categories.CategoryIDColumn.ColumnName;&lt;br /&gt;   this.WebCombo1.DataBind();&lt;br /&gt;   //make sure the grid allows for editing&lt;br /&gt;   this.UltraWebGrid1.DisplayLayout.AllowUpdateDefault = Infragistics.WebUI.UltraWebGrid.AllowUpdate.Yes;&lt;br /&gt;   //assign the webcombo as an editor for the CategoryID column in the grid&lt;br /&gt;   this.UltraWebGrid1.DisplayLayout.Bands[0].Columns.FromKey("CategoryID").Type = Infragistics.WebUI.UltraWebGrid.ColumnType.DropDownList;&lt;br /&gt;   this.UltraWebGrid1.DisplayLayout.Bands[0].Columns.FromKey("CategoryID").EditorControlID = this.WebCombo1.UniqueID;&lt;br /&gt;}&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-1422031505609229740?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/1422031505609229740/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=1422031505609229740' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/1422031505609229740'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/1422031505609229740'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/12/use-webcombo-as-column-editor-in.html' title='use the WebCombo as a column editor in WebGrid'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-6927788882350567389</id><published>2008-09-21T12:02:00.001-07:00</published><updated>2008-12-15T12:04:31.576-08:00</updated><title type='text'>Filtering the XSLT / AJAX WebGrid</title><content type='html'>&lt;span id="Summary"&gt;Whenever we enable the WebGrid’s XML Load On Demand functionality, this essentially makes use of AJAX requests to fetch the additional rows as they are scrolled into view. Performing other programmatic actions against the Data Source of the Grid such as filtering and sorting requires us to follow some important guidelines so that you will get the results that you expect. This article will show how to allow filtering on the underlying DataView that the WebGrid is bound to.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="AdditionalInfo"&gt;Whenever we have XML Load On Demand functionality enabled, any posting back will essentially cause the page and the WebGrid to be reset back to the way it was since the first time it was loaded. For example, if the page with the Grid is loaded and the user requests several batches of rows and then performs a full postback, the Grid will be loaded on the page with the same amount of rows that were initially loaded on the first page load. The Web Server is not aware of any additional rows that were fetched with AJAX requests. In the case that we want to allow the user to filter the data that the WebGrid is bound to, you will need to essentially clear the Grid rows explicitly and then rebind to the new result set. You can think of the XML Load On Demand as a form of “Paging” where you have a fixed Data Source and as you scroll through the records, the additional “Pages” are fetched using AJAX requests. The WebGrid needs to have the same exact Data Source each time its _InitializeDataSource event is fired. If you plan on changing the Data Source in any way (Ex: change its schema, change the rows that it contains, etc) you will need to clear the Grid rows and then reassign the Data Source and then DataBind. This will now allow the Grid to work with the new Data Source.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;h3&gt;Step-By-Step Example&lt;/h3&gt;                   &lt;span id="StepByStep"&gt;In this particular implementation, we are going to follow a particular pattern to have the following functionality:&lt;br /&gt;&lt;br /&gt;1)    The page will load with all records from a particular table&lt;br /&gt;2)    The user has the ability to enter text and apply a filter to the Data&lt;br /&gt;3)    The page then reloads with the resulting records&lt;br /&gt;&lt;br /&gt;To achieve this functionality within a standard grid would be very simple. You would retrieve all of your data the first time and then whenever you need to apply a filter, you would set the filter and then rebind the grid and the page will reload with the new data. With the AJAX functionality enabled, we will need to work with the understanding that the WebGrid uses the InitializeDataSource event to build itself up and create its rows. Whenever applying a filter through server side code, it will be required that the WebGrid rows are all completely removed and then we explicitly assign the DataSource and then call DataBind. Here is the following code to further illustrate what is actually done:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;summary&gt;/// Make a property that returns a cached set of Data&lt;br /&gt;/// &lt;/summary&gt;&lt;br /&gt;public WebGrid_AJAX_Filtering_DataView_2005V2_CS.DataSetNorthWind.OrdersDataTable Orders&lt;br /&gt;{&lt;br /&gt;   get&lt;br /&gt;   {&lt;br /&gt;       if (Session["data"] == null)&lt;br /&gt;       {&lt;br /&gt;           this.sqlDataAdapterOrders.Fill(this.dataSetNorthWind1.Orders);&lt;br /&gt;           this.dataSetNorthWind1.Orders.DefaultView.Sort = "CustomerID ASC";&lt;br /&gt;           Session["data"] = this.dataSetNorthWind1.Orders;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       return (WebGrid_AJAX_Filtering_DataView_2005V2_CS.DataSetNorthWind.OrdersDataTable) Session["data"];&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/// &lt;summary&gt;&lt;br /&gt;/// Give the grid its Data&lt;br /&gt;/// &lt;/summary&gt;&lt;br /&gt;/// &lt;/span&gt;&lt;table cellpadding="4" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td bgcolor="#eeeeee"&gt;&lt;param name="sender"&gt;&lt;br /&gt;/// &lt;param name="e"&gt;&lt;br /&gt;private void UltraWebGrid1_InitializeDataSource(object sender, Infragistics.WebUI.UltraWebGrid.UltraGridEventArgs e)&lt;br /&gt;{&lt;br /&gt;         &lt;br /&gt;   this.UltraWebGrid1.DataSource = this.Orders.DefaultView;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/// &lt;summary&gt;&lt;br /&gt;/// Whenever we click on this button, we will apply a filter to the DataView.&lt;br /&gt;/// We need to clear the Grid rows and then rebind it explicitly so that the results&lt;br /&gt;/// are shown.&lt;br /&gt;/// &lt;/summary&gt;&lt;br /&gt;/// &lt;param name="sender"&gt;&lt;br /&gt;/// &lt;param name="e"&gt;&lt;br /&gt;private void Button1_Click(object sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;   this.UltraWebGrid1.Rows.Clear();&lt;br /&gt;   if (this.TextBox1.Text == "")&lt;br /&gt;   {&lt;br /&gt;       this.Orders.DefaultView.RowFilter = "";&lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;       this.Orders.DefaultView.RowFilter = "CustomerID LIKE '%" + this.TextBox1.Text + "%'" ;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   this.Label2.Text = this.Orders.DefaultView.Count + " Records Were Found";&lt;br /&gt;         &lt;br /&gt;   this.UltraWebGrid1.DataSource = this.Orders.DefaultView;&lt;br /&gt;   this.UltraWebGrid1.DataBind();&lt;br /&gt;}&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;If you notice, we cache the Orders DataTable in the Session so that the user can work with a particular set of Data. Filtering and sorting can be applied to this cached Data and each time the user applies a filter, the Cached Data is filtered and assigned to the WebGrid. Upon filtering and DataBinding, the WebGrid now has an altered Data Source that will be reloaded with a complete postback. The user can now navigate the new result set by scrolling and causing the AJAX requests to be made against the new result set so that the WebGrid’s InitializeDataSource event can fetch the data that it needs from the Session. This allows a flexible means for the user to work on the Data as well as enjoy the benefit of having the Load On Demand functionality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-6927788882350567389?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/6927788882350567389/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=6927788882350567389' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/6927788882350567389'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/6927788882350567389'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/09/filtering-xslt-ajax-webgrid_21.html' title='Filtering the XSLT / AJAX WebGrid'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-5050531429914058573</id><published>2008-09-21T12:02:00.000-07:00</published><updated>2008-12-15T12:04:47.564-08:00</updated><title type='text'>Filtering the XSLT / AJAX WebGrid</title><content type='html'>&lt;span id="Summary"&gt;Whenever we enable the WebGrid’s XML Load On Demand functionality, this essentially makes use of AJAX requests to fetch the additional rows as they are scrolled into view. Performing other programmatic actions against the Data Source of the Grid such as filtering and sorting requires us to follow some important guidelines so that you will get the results that you expect. This article will show how to allow filtering on the underlying DataView that the WebGrid is bound to.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="AdditionalInfo"&gt;Whenever we have XML Load On Demand functionality enabled, any posting back will essentially cause the page and the WebGrid to be reset back to the way it was since the first time it was loaded. For example, if the page with the Grid is loaded and the user requests several batches of rows and then performs a full postback, the Grid will be loaded on the page with the same amount of rows that were initially loaded on the first page load. The Web Server is not aware of any additional rows that were fetched with AJAX requests. In the case that we want to allow the user to filter the data that the WebGrid is bound to, you will need to essentially clear the Grid rows explicitly and then rebind to the new result set. You can think of the XML Load On Demand as a form of “Paging” where you have a fixed Data Source and as you scroll through the records, the additional “Pages” are fetched using AJAX requests. The WebGrid needs to have the same exact Data Source each time its _InitializeDataSource event is fired. If you plan on changing the Data Source in any way (Ex: change its schema, change the rows that it contains, etc) you will need to clear the Grid rows and then reassign the Data Source and then DataBind. This will now allow the Grid to work with the new Data Source.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;h3&gt;Step-By-Step Example&lt;/h3&gt;                   &lt;span id="StepByStep"&gt;In this particular implementation, we are going to follow a particular pattern to have the following functionality:&lt;br /&gt;&lt;br /&gt;1)    The page will load with all records from a particular table&lt;br /&gt;2)    The user has the ability to enter text and apply a filter to the Data&lt;br /&gt;3)    The page then reloads with the resulting records&lt;br /&gt;&lt;br /&gt;To achieve this functionality within a standard grid would be very simple. You would retrieve all of your data the first time and then whenever you need to apply a filter, you would set the filter and then rebind the grid and the page will reload with the new data. With the AJAX functionality enabled, we will need to work with the understanding that the WebGrid uses the InitializeDataSource event to build itself up and create its rows. Whenever applying a filter through server side code, it will be required that the WebGrid rows are all completely removed and then we explicitly assign the DataSource and then call DataBind. Here is the following code to further illustrate what is actually done:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;summary&gt;/// Make a property that returns a cached set of Data&lt;br /&gt;/// &lt;/summary&gt;&lt;br /&gt;public WebGrid_AJAX_Filtering_DataView_2005V2_CS.DataSetNorthWind.OrdersDataTable Orders&lt;br /&gt;{&lt;br /&gt;   get&lt;br /&gt;   {&lt;br /&gt;       if (Session["data"] == null)&lt;br /&gt;       {&lt;br /&gt;           this.sqlDataAdapterOrders.Fill(this.dataSetNorthWind1.Orders);&lt;br /&gt;           this.dataSetNorthWind1.Orders.DefaultView.Sort = "CustomerID ASC";&lt;br /&gt;           Session["data"] = this.dataSetNorthWind1.Orders;&lt;br /&gt;       }&lt;br /&gt;&lt;br /&gt;       return (WebGrid_AJAX_Filtering_DataView_2005V2_CS.DataSetNorthWind.OrdersDataTable) Session["data"];&lt;br /&gt;   }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/// &lt;summary&gt;&lt;br /&gt;/// Give the grid its Data&lt;br /&gt;/// &lt;/summary&gt;&lt;br /&gt;/// &lt;/span&gt;&lt;table cellpadding="4" cellspacing="0"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td bgcolor="#eeeeee"&gt;&lt;param name="sender"&gt;&lt;br /&gt;/// &lt;param name="e"&gt;&lt;br /&gt;private void UltraWebGrid1_InitializeDataSource(object sender, Infragistics.WebUI.UltraWebGrid.UltraGridEventArgs e)&lt;br /&gt;{&lt;br /&gt;         &lt;br /&gt;   this.UltraWebGrid1.DataSource = this.Orders.DefaultView;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/// &lt;summary&gt;&lt;br /&gt;/// Whenever we click on this button, we will apply a filter to the DataView.&lt;br /&gt;/// We need to clear the Grid rows and then rebind it explicitly so that the results&lt;br /&gt;/// are shown.&lt;br /&gt;/// &lt;/summary&gt;&lt;br /&gt;/// &lt;param name="sender"&gt;&lt;br /&gt;/// &lt;param name="e"&gt;&lt;br /&gt;private void Button1_Click(object sender, System.EventArgs e)&lt;br /&gt;{&lt;br /&gt;   this.UltraWebGrid1.Rows.Clear();&lt;br /&gt;   if (this.TextBox1.Text == "")&lt;br /&gt;   {&lt;br /&gt;       this.Orders.DefaultView.RowFilter = "";&lt;br /&gt;   }&lt;br /&gt;   else&lt;br /&gt;   {&lt;br /&gt;       this.Orders.DefaultView.RowFilter = "CustomerID LIKE '%" + this.TextBox1.Text + "%'" ;&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt;   this.Label2.Text = this.Orders.DefaultView.Count + " Records Were Found";&lt;br /&gt;         &lt;br /&gt;   this.UltraWebGrid1.DataSource = this.Orders.DefaultView;&lt;br /&gt;   this.UltraWebGrid1.DataBind();&lt;br /&gt;}&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;If you notice, we cache the Orders DataTable in the Session so that the user can work with a particular set of Data. Filtering and sorting can be applied to this cached Data and each time the user applies a filter, the Cached Data is filtered and assigned to the WebGrid. Upon filtering and DataBinding, the WebGrid now has an altered Data Source that will be reloaded with a complete postback. The user can now navigate the new result set by scrolling and causing the AJAX requests to be made against the new result set so that the WebGrid’s InitializeDataSource event can fetch the data that it needs from the Session. This allows a flexible means for the user to work on the Data as well as enjoy the benefit of having the Load On Demand functionality.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-5050531429914058573?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/5050531429914058573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=5050531429914058573' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/5050531429914058573'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/5050531429914058573'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/09/filtering-xslt-ajax-webgrid.html' title='Filtering the XSLT / AJAX WebGrid'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-8140898729935859933</id><published>2008-09-21T12:01:00.001-07:00</published><updated>2008-12-15T12:04:39.783-08:00</updated><title type='text'>WebGrid header text orient vertically instead of horizontally</title><content type='html'>&lt;span id="Summary"&gt;The HTML rendered for the display of the HeaderText can be modified to reorient vertically by adding a DIV tag to the HeaderText of the column.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="AdditionalInfo"&gt;To show the HeaderText of a column vertically oriented you would need to modify the HeaderText of the column. As the UltraWebGrid eventually renders down as HTML, modification of the HTML elements, or adding new HTML elements as is the case in this sample, enhances the customizable look and feel of the UltraWebGrid.&lt;br /&gt;&lt;br /&gt;This solution is based off of IE6+ and will render normally in most other browsers as the attributes on the DIV tag will be ignored.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;e.Layout.Bands[0].Columns.FromKey("Active").HeaderText = "&lt;div style=""&gt;" + e.Layout.Bands[0].Columns.FromKey("Active").HeaderText + "&lt;/div&gt;"&lt;br /&gt;e.Layout.Bands[0].Columns.FromKey("Active").Width = Unit.Pixel(10)&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-8140898729935859933?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/8140898729935859933/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=8140898729935859933' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/8140898729935859933'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/8140898729935859933'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/09/webgrid-header-text-orient-vertically.html' title='WebGrid header text orient vertically instead of horizontally'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-3201494947795488015</id><published>2008-09-21T12:00:00.000-07:00</published><updated>2008-12-15T12:04:42.742-08:00</updated><title type='text'>Make a WebGrid cell read-only in certain conditions</title><content type='html'>&lt;span id="Summary"&gt;Sometimes it is necessary to make a WebGrid cell read-only based on some condition. This article shows how to set a cell as read-only, which can be done on the client-side or server-side.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="AdditionalInfo"&gt;To do this on the server, set the AllowEditing property of the cell to "AllowEditing.No". On the client, the cell needs to be disabled using the BeforeEnterEditMode client-side event handler.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="StepByStep"&gt;&lt;i&gt;Server-Side:&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In the InitializeRow event, set AllowEditing property to "AllowEditing.No" after checking the condition. In this example, updates are forbidden for cells in the fourth column if the value is already greater than 5000:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;private void UltraWebGrid1_InitializeRow(object sender, Infragistics.WebUI.UltraWebGrid.RowEventArgs e)&lt;br /&gt;{&lt;br /&gt;   if ((int) e.Row.Cells[3].Value &gt; 5000)&lt;br /&gt;   {&lt;br /&gt;       e.Row.Cells[3].AllowEditing = Infragistics.WebUI.UltraWebGrid.AllowEditing.No;&lt;br /&gt;   }&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-3201494947795488015?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/3201494947795488015/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=3201494947795488015' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/3201494947795488015'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/3201494947795488015'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/09/make-webgrid-cell-read-only-in-certain.html' title='Make a WebGrid cell read-only in certain conditions'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-6285565461387272747</id><published>2008-09-21T11:58:00.001-07:00</published><updated>2008-12-15T12:05:03.877-08:00</updated><title type='text'>get rid of scrollbars and set maximum width and height in UltraWebGrid</title><content type='html'>&lt;span id="Summary"&gt;You can make a WebGrid display with no scrollbars, and fit its height and width to the size of the browser.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;this.ultraWebGrid1.Width = Unit.Percentage(100);&lt;br /&gt;this.ultraWebGrid1.Height = Unit.Percentage(100);&lt;br /&gt;this.ultraWebGrid1.DisplayLayout.FrameStyle.CustomRules = "table-layout:auto";&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-6285565461387272747?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/6285565461387272747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=6285565461387272747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/6285565461387272747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/6285565461387272747'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/09/get-rid-of-scrollbars-and-set-maximum.html' title='get rid of scrollbars and set maximum width and height in UltraWebGrid'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-8594325439998170751</id><published>2008-09-21T11:57:00.000-07:00</published><updated>2008-12-15T12:05:07.702-08:00</updated><title type='text'>FilterRow functionality in the UltraWebGrid when handling its server-side Click event</title><content type='html'>&lt;span id="Summary"&gt;When trying to use the UltraWebGrid’s FilterRow functionality, if you are handling its server-side Click event, you will not get the functionality you expect. When a cell in the FilterRow is clicked, the grid posts back, the cell loses focus, and the FilterRow drop down never appears. The way around this is to handle the client-side click event for the grid and cancel the postback if a cell in the filter row is clicked.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span id="AdditionalInfo"&gt;First set the UltraWebGrid’s AllowRowFiltering property to OnClient and its FilterUIType property to FilterRow.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;UltraWebGrid1.DisplayLayout.Bands[0].FilterOptions.AllowRowFiltering = Infragistics.WebUI.UltraWebGrid.RowFiltering.OnClient;&lt;br /&gt;UltraWebGrid1.DisplayLayout.Bands[0].FilterOptions.FilterUIType = Infragistics.WebUI.UltraWebGrid.FilterUIType.FilterRow;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;UltraWebGrid1.DataKeyField = "CustomerID";&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-8594325439998170751?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/8594325439998170751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=8594325439998170751' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/8594325439998170751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/8594325439998170751'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/09/filterrow-functionality-in-ultrawebgrid.html' title='FilterRow functionality in the UltraWebGrid when handling its server-side Click event'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-4399796972393115052</id><published>2008-09-21T11:53:00.000-07:00</published><updated>2008-12-15T12:05:10.216-08:00</updated><title type='text'>hide the AddNew button for some, but not all of the bands in UltraWebGrid</title><content type='html'>&lt;span id="Summary"&gt;This is possible through some JavaScript code.&lt;br /&gt;&lt;br /&gt;The Grid's add new buttons are given IDs as follows:&lt;br /&gt;gridname+_+an+_+band number.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;Grid name=UltraWebGrid1&lt;br /&gt;band=1.&lt;br /&gt;the button Id = UltraWebGrid1_an_1&lt;br /&gt;&lt;br /&gt;Therefore, place the following JavaScript block AFTER the grid in the HTML, and your grid will no longer display the band 1 add new button:&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;place this code inside script tags:&lt;br /&gt;&lt;br /&gt;   igtbl_getElementById("UltraWebGrid1_an_1").style.display="none";&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-4399796972393115052?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/4399796972393115052/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=4399796972393115052' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/4399796972393115052'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/4399796972393115052'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/09/hide-addnew-button-for-some-but-not-all.html' title='hide the AddNew button for some, but not all of the bands in UltraWebGrid'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4556420708376409331.post-7335192301089098530</id><published>2008-09-21T11:45:00.000-07:00</published><updated>2008-12-15T12:05:18.223-08:00</updated><title type='text'>Code for creating  grid dynamically</title><content type='html'>&lt;span id="Summary"&gt;UltraWebGrid can be created dynamically from code, without being placed on the form at design-time. To accomplish this, a specific constructor must be used which passes in the Id of the control.&lt;br /&gt;&lt;br /&gt;To create the grid dynamically, use the following code:&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style=";font-family:Courier New;font-size:70;"  &gt;&lt;br /&gt;protected Infragistics.WebUI.UltraWebGrid.UltraWebGrid UltraWebGrid1;&lt;br /&gt;UltraWebGrid1 = new Infragistics.WebUI.UltraWebGrid.UltraWebGrid("UltraWebGrid1");&lt;br /&gt;UltraWebGrid1.Columns.Add("col1", "Column 1");&lt;br /&gt;UltraWebGrid1.Columns.Add("col2", "Column 2");&lt;br /&gt;UltraWebGrid1.Columns.Add("col3", "Column 3");&lt;br /&gt;&lt;br /&gt;object [] cells = { "Cell1", "Cell2", "Cell3"};&lt;br /&gt;UltraWebGrid1.Rows.Add(new UltraGridRow(cells));&lt;br /&gt;UltraWebGrid1.Rows.Add(new UltraGridRow(cells));&lt;br /&gt;UltraWebGrid1.Rows.Add(new UltraGridRow(cells));&lt;br /&gt;this.Controls.Add(UltraWebGrid1); &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4556420708376409331-7335192301089098530?l=ultrawebgrid.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ultrawebgrid.blogspot.com/feeds/7335192301089098530/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4556420708376409331&amp;postID=7335192301089098530' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/7335192301089098530'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4556420708376409331/posts/default/7335192301089098530'/><link rel='alternate' type='text/html' href='http://ultrawebgrid.blogspot.com/2008/09/code-for-creating-grid-dynamically.html' title='Code for creating  grid dynamically'/><author><name>Suryan</name><uri>http://www.blogger.com/profile/13105667391803774774</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
