Intersoft WebGrid Documentation
Enhancements
See Also Send comments on this topic.

Glossary Item Box

In addition to dozens of exciting new features introduced in version 5.0, WebGrid also includes enhancements to performance, server side and client side object model and several important areas such as discussed in following sub topics.

Server-side object model

Most significantly enhanced server-side object model in version 5.0 is related to new classes constructors and overloads for commonly used classes. For instance, you can now create several cells and rows in one line of code, and add them at once using AddRange method of the collection.

Sample codes in C#:

C# Copy Code
WebGridRow[] rootRows = new WebGridRow[6];

for (int i = 0; i < 6; i++)
     rootRows[i] = WebGrid1.RootTable.CreateRow(); 
        
rootRows[0].Cells.SetItemData(new string[] { "172-32-1176", "White", "Johnson" });
rootRows[1].Cells.SetItemData(new string[] { "213-46-8915", "Green", "Marjorie" });
rootRows[2].Cells.SetItemData(new string[] { "238-95-7766", "Carson", "Cheryl" });
rootRows[3].Cells.SetItemData(new string[] { "267-41-2394", "O'Leary", "Michael" });
rootRows[4].Cells.SetItemData(new string[] { "274-80-9391", "Straight", "Dean" });
rootRows[5].Cells.SetItemData(new string[] { "341-22-1782", "Smith", "Meander" });

WebGrid1.RootTable.Rows.AddRange(rootRows);             

In above sample, the CreateRow is a new method of WebGridTable class which creates and initializes WebGridCell according to the columns and structures available in WebGridTable. The SetItemData method allows you to easily set an array of string which will be mapped to the cells in WebGridCellCollection respectively. The AddRange method finally perform the addition of the WebGridRow arrays to the WebGridTable.
In previous version, the same sample could take 2-3 times more codes compared to above codes. The enhanced server side object model in version 5.0 enables developers to access and manipulate the WebGrid control in less efforts and codes.

Client-side object model

New methods and objects have been added to client-side object model in version 5.0 to reflect new API that added to server side. The following is the details of newly added objects and methods:

Client events and user interaction

Exporting

User Interface

Core engine on output optimization

Hierarchical

One of the new enhancements in this feature is that WebGrid now fully supports hierarchical data binding in unbound mode.

Editing

The editing performance has been enhanced in the latest WebGrid's version, such as HtmlEditor supports Mozilla and SmartWebResources.

Filtering

In WebGrid  V5.0, Filter types are now displayed based on column's data type.

Context Menu

Context menu comes up with a new runtime engine, which is now based on Intersoft's Hybrid Menu Runtime System™. Hence, the performance is faster and it has a better stability.

Self Reference

One of the ability of enhanced grid's self reference is to select the child row of a specified parent row from server side.


Sample codes in JavaScript:

function GetChildRows() 
     { 
          var grid = ISGetObject("WebGrid1");
          var selObj = grid.GetSelectedObject(); 

          if (selObj != null)
          {
              var row = selObj.GetRowObject();
              var srChildRows = row.GetSelfRefChildRows(); 

              if (srChildRows.length > 0)
              { 
                  var firstChild = srChildRows[0];

                  alert("Total child rows: " + srChildRows.length + "\n" + "First child row's FirstName Text: " + firstChild.GetCell("FirstName").Text);
              }
              else
                  alert("There are no child rows for this parent."); 
     }
}

To learn more, refer to WebGrid V5.0 Tutorial > GetSelfRefChildRow.aspx.

WebGrid with external AJAX Framework

WebGrid V5.0 now fully supports external AJAX Framework such as ASP.NET AJAX.

In addition to powerful built-in AJAX capability, WebGrid also allows you to use external AJAX Framework to partially refresh the control using AJAX technique. This is made possible with the rock-solid server side architecture and extensible built-in AJAX Framework which is based on WebUI.NET Framework.

WebGrid includes native support for emerging AJAX Framework such as ASP.NET. WebGrid includes native support for emerging AJAX Framework such as ASP.NET AJAX from Microsoft. You can use ASP.NET AJAX's UpdatePanel to perform partial update on the WebGrid control. WebGrid also supports Intersoft's proprietary AJAX Manager, known as WebFlyPostBackManager.

To learn more about these features, please refer to the section below.

 

Walkthrough Topics

Walkthrough: Using WebGrid with ASP.NET AJAX RTM

Walkthrough: Using WebGrid with WebFlyPostBackManager

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.