Intersoft WebGrid Documentation
WebGrid Class
Members  See Also  Send Feedback
ISNet.WebUI.WebGrid Namespace : WebGrid Class






Intersoft WebGrid.NET is an advanced DataGrid component for ASP.NET Web development. WebGrid.NET provides comprehensive list of functions that enable enterprise-class information to be delivered in hierarchical navigation with sophisticated user interaction. As a result, users can work with the information in a more effective and productive way.

Object Model

WebGrid Class

Syntax

Visual Basic (Declaration) 
<DefaultEventAttribute("InitializeDataSource")>
<DefaultPropertyAttribute("LayoutSettings")>
<DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="ISNet.WebUI.WebGrid.WebGridDesigner, ISNet.WebUI.WebGrid, Version=8.0.7200.100, Culture=neutral, PublicKeyToken=3e60b85fb8502d5e")>
<ISNet.Serialization.XmlSerializableAttribute("WebGrid_Core.js;WebGrid_UI.js;WebGrid_Events.js")>
<ToolboxDataAttribute("<{0}:WebGrid runat="server" UseDefaultStyle="true" Width="500px" Height="250px"></{0}:WebGrid>")>
<SerializableAttribute()>
<AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand Or  _
    SecurityAction.Deny Or  _
    SecurityAction.LinkDemand, 
   Unrestricted=False)>
<AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand Or  _
    SecurityAction.Assert Or  _
    SecurityAction.Deny Or  _
    SecurityAction.PermitOnly Or  _
    SecurityAction.LinkDemand Or  _
    SecurityAction.InheritanceDemand, 
   Unrestricted=False)>
Public Class WebGrid 
   Inherits ISNet.WebUI.ISNetControl
   Implements ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource, ISNet.WebUI.ITemplateSync 
Visual Basic (Usage)Copy Code
Dim instance As WebGrid
C# 
[DefaultEventAttribute("InitializeDataSource")]
[DefaultPropertyAttribute("LayoutSettings")]
[DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="ISNet.WebUI.WebGrid.WebGridDesigner, ISNet.WebUI.WebGrid, Version=8.0.7200.100, Culture=neutral, PublicKeyToken=3e60b85fb8502d5e")]
[ISNet.Serialization.XmlSerializableAttribute("WebGrid_Core.js;WebGrid_UI.js;WebGrid_Events.js")]
[ToolboxDataAttribute("<{0}:WebGrid runat="server" UseDefaultStyle="true" Width="500px" Height="250px"></{0}:WebGrid>")]
[SerializableAttribute()]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Deny | 
    SecurityAction.LinkDemand, 
   Unrestricted=false)]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Assert | 
    SecurityAction.Deny | 
    SecurityAction.PermitOnly | 
    SecurityAction.LinkDemand | 
    SecurityAction.InheritanceDemand, 
   Unrestricted=false)]
public class WebGrid : ISNet.WebUI.ISNetControl, ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource, ISNet.WebUI.ITemplateSync  
Delphi 
public class WebGrid = class(ISNet.WebUI.ISNetControl, ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource, ISNet.WebUI.ITemplateSync)
JScript 
DefaultEventAttribute("InitializeDataSource")
DefaultPropertyAttribute("LayoutSettings")
DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="ISNet.WebUI.WebGrid.WebGridDesigner, ISNet.WebUI.WebGrid, Version=8.0.7200.100, Culture=neutral, PublicKeyToken=3e60b85fb8502d5e")
ISNet.Serialization.XmlSerializableAttribute("WebGrid_Core.js;WebGrid_UI.js;WebGrid_Events.js")
ToolboxDataAttribute("<{0}:WebGrid runat="server" UseDefaultStyle="true" Width="500px" Height="250px"></{0}:WebGrid>")
SerializableAttribute()
AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Deny | 
    SecurityAction.LinkDemand, 
   Unrestricted=)
AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Assert | 
    SecurityAction.Deny | 
    SecurityAction.PermitOnly | 
    SecurityAction.LinkDemand | 
    SecurityAction.InheritanceDemand, 
   Unrestricted=)
public class WebGrid extends ISNet.WebUI.ISNetControl implements ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource, ISNet.WebUI.ITemplateSync 
Managed Extensions for C++ 
[DefaultEventAttribute("InitializeDataSource")]
[DefaultPropertyAttribute("LayoutSettings")]
[DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="ISNet.WebUI.WebGrid.WebGridDesigner, ISNet.WebUI.WebGrid, Version=8.0.7200.100, Culture=neutral, PublicKeyToken=3e60b85fb8502d5e")]
[ISNet.Serialization.XmlSerializableAttribute("WebGrid_Core.js;WebGrid_UI.js;WebGrid_Events.js")]
[ToolboxDataAttribute("<{0}:WebGrid runat="server" UseDefaultStyle="true" Width="500px" Height="250px"></{0}:WebGrid>")]
[SerializableAttribute()]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Deny | 
    SecurityAction.LinkDemand, 
   Unrestricted=false)]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Assert | 
    SecurityAction.Deny | 
    SecurityAction.PermitOnly | 
    SecurityAction.LinkDemand | 
    SecurityAction.InheritanceDemand, 
   Unrestricted=false)]
public __gc class WebGrid : public ISNet.WebUI.ISNetControl, ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource, ISNet.WebUI.ITemplateSync  
C++/CLI 
[DefaultEventAttribute("InitializeDataSource")]
[DefaultPropertyAttribute("LayoutSettings")]
[DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="ISNet.WebUI.WebGrid.WebGridDesigner, ISNet.WebUI.WebGrid, Version=8.0.7200.100, Culture=neutral, PublicKeyToken=3e60b85fb8502d5e")]
[ISNet.Serialization.XmlSerializableAttribute("WebGrid_Core.js;WebGrid_UI.js;WebGrid_Events.js")]
[ToolboxDataAttribute("<{0}:WebGrid runat="server" UseDefaultStyle="true" Width="500px" Height="250px"></{0}:WebGrid>")]
[SerializableAttribute()]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Deny | 
    SecurityAction.LinkDemand, 
   Unrestricted=false)]
[AspNetHostingPermissionAttribute(Level=AspNetHostingPermissionLevel.Minimal, 
   Action=SecurityAction.Demand | 
    SecurityAction.Assert | 
    SecurityAction.Deny | 
    SecurityAction.PermitOnly | 
    SecurityAction.LinkDemand | 
    SecurityAction.InheritanceDemand, 
   Unrestricted=false)]
public ref class WebGrid : public ISNet.WebUI.ISNetControl, ISNet.ICopyable, ISNet.IObjectState, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.Serialization.XmlSerialization.ICustomXmlSerializer, ISNet.Serialization.XmlSerialization.IXmlSerialize, ISNet.WebUI.IAutoDataCache, ISNet.WebUI.IBaseISNetControl, ISNet.WebUI.IClientAction, ISNet.WebUI.IClientBinding, ISNet.WebUI.IDataSourceControlSupport, ISNet.WebUI.IFlyPostBack, ISNet.WebUI.IInfo, ISNet.WebUI.ILayoutSettings, ISNet.WebUI.ISDataSource, ISNet.WebUI.ITemplateSync  

Remarks

WebGrid.NET Enterprise Version 4.0 is a major redesign compared with its previous version. Some of the major redesigns are the rebuild of the product on the top of Intersoft WebUI.NET. Not only it exposes the powerful and rich features of the Framework, the product now has the benefit of true integration and power of a Framework, delivering consistency and extensible object models among all Intersoft's products.

WebGrid.NET Enterprise version 5.0 is the most significant major upgrade since initial version of WebGrid.NET. The current version contains key enhancements in user interface, enhanced grid functions, Excel© style column freezing, declarative data binding support and rich designer experience. WebGrid.NET Enterprise version 5.0 has the ability to bind the Grid control to a hierarchical datasource control. The integration of WebGrid.NET 5.0 and ISDataSource control allow you to bind hierarchical datasource without using any code.

The key features in WebGrid.NET Enterprise 5.0 include:
1. Hassle-free deployment through SmartWebResources™ technology

2. No-codes data binding through DataSourceControl support

3. Rich User Interface Elements

4. Advance User Interactions

5. Automatic Data Processing

6. Hierarchical and Child tables

7. Rich Styles

8. Events

9. Custom Aggregation

10. Group Intervals

11. Edit Types

12. Enhanced Client-Server Programmability

13. Row Checker

14. Text Settings

15. Special features

As the main object of the control, WebGrid contains LayoutSettings property which is a centralized place to customize most of the WebGrid's appearances and behavior. LayoutSetting contains numerous feature that allow you to customize each part of the control's look and feel directly at design-time. You can set many features, such as: AllowAddNew, AllowColumnSizing, AllowEdit, AllowExport, AllowDelete, and so on.  

Furthermore, WebGrid.NET allows you to completely customize its appearance, look, and behavior in rich styles. The core style object is implemented in WebGridFormatStyle class, which contains numerous appearance-related such as BackColor, Font, BorderColor and so on; and is implemented by all UI elements such as Rows, Cells. The WebGridFormatStyle also allows you to put custom CSS Rules with the CustomRules property.

New in WebGrid.NET Enterprise 5.0 is the ability to bind the Grid control to a hierarchical datasource control. WebGrid.NET Enterprise 5.0 is designed to integrate closely with ISDataSource control. This solid integration allows you to bind hierarchical datasource in much the same way as in Visual Studio.NET 2003. With this exclusive ISDataSource control support, you get the benefits of declarative databinding for hierarchical tables. Thus you will be able to perform data selection, updating, deleting and other data operations without writing any codes.

WebGrid.NET Enterprise 5.0 is designed for ASP.NET 2.0 in order to fully support native databinding and new design-time features to improve developer's productivity. The new optimization features available in version 5.0 for better performance especially if you enable the following features:

  • DefaultStyle. Enable DefaultStyle feature in WebGrid will significantly reduce page output size, especially when large number of WebGrid is placed in a webform.
  • SmartWebResources. When enabled, this feature will allow you to easily deploy WebGrid without the need of physical client resources. With this feature, you can now develop ASP.NET 2.0 File System's website without additional efforts. To learn more please read How-to: Configure SmartWebResources in a new web application.

 

New User Interface

WebGrid.NET Enterprise 5.0 presents new user interface such as new icon-sets, new context menu engine and styles, as well as new “Elegant” style. These new features help end users to interact with information better with a Grid which is not only powerful in functions, but appealing to eyes and experience as well.

  • Some of the new features related to user interface are:
    Status bar group. The status text is now easier to be read with clear separation between each different function group.
  • New theme and improved styles with smooth blue "Glass" appearance in Elegant style.
  • New set of icons, such as new status bar icons and better loading indicator. All context menu items are also having new icons as well. 
  • Pixel-perfect rendering for Mozilla-based browsers. In version 5.0, the box dimensions for cell, row and other user interface has the equal layout as displayed in Internet Explorer.
  • Unhandled server exception’s error box can now be skipped. By setting DisplayDetailsOnUnhandledError property to False, the error box will not be displayed immediately. Instead, the error indicator will appear in the status bar. You can click on the status bar to display the error detail message box.
  • User-friendly command messages based on data type. For instance, sorting text is now customized according to the data type. These new textual elements are included as localizable text (controlled by Localization feature).
  • New RowHighlightType for more convenient editing experience.
  • New high-performance context menu interface with smooth fading animation and shadow effect.
  • Improved User Interface for Error Dialog Box.
  • Visual indicator for action status and editing information in Status Bar.

New in WebGrid.NET Enterprise 5.0 is the ability to bind the Grid control to a hierarchical datasource control. WebGrid.NET Enterprise 5.0 is designed to integrate closely with ISDataSource control. This solid integration allows you to bind hierarchical datasource in much the same way as in Visual Studio.NET 2003. With this exclusive ISDataSource control support, you get the benefits of declarative databinding for hierarchical tables. Thus you will be able to perform data selection, updating, deleting and other data operations without writing any codes.

 

Codeless DataBinding

The major difference in WebGrid.NET Enterprise 5.0 compared to v4.0 is the ability to create codeless data binding, which has never been existed before. Codeless databinding means that you can configure the datasource, its connection and its related property without writing codes. In other words, you can quickly configure the WebGrid to connect to a datasource by simply using drag, drop and click.

Declaratively, you can create a WebGrid instance and bind it to a table in your Sql database in two simple statements as in the following:

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<$ ConnectionStrings>" SelectCommand="SELECT * FROM [Tasks]"></asp:SqlDataSource>

 <ISWebGrid:WebGrid ID="WebGrid1" runat="server" DataSourceID="SqlDataSource1" Height="300px” HorizontalAlign="NotSet" Width="100%">

</ISWebGrid:WebGrid>

As you can see with the above statements, the WebGrid1 control is bound to a datasource control through DataSourceID property. The WebGrid control connects to the specified datasource control and display data from the datasource available in SqlDataSource1.

With this new databinding concept, programming databind web application is very easy, simple and straightforward. No codes required in the page's code behind. In WebGrid.NET Enterprise 5.0, you do not need to configure InitializeDataSource event and write codes inside the event which pass the datasource to e.DataSource. However, the old databinding mechanism is still supported for backward compatibility. The codeless databinding will be a major significant gain that you can experience. For more information you can read: Walkthrough: Binding WebGrid to AccessDataSource control, Walkthrough: Binding WebGrid to ObjectDataSource control, and Walkthrough: Binding WebGrid to XMLDataSource control.

 

Improved Data Caching (for traditional data-binding)

The data caching feature in WebGrid.NET 5.0 Enterprise has been significantly improved to avoid memory leaks and lower usage of allocated resources when the DataCacheStorage is set to PageCache (default).

Note that the built-in data caching is disabled by default when the WebGrid is bound to datasource control. The data caching is provided for the usage when the WebGrid is bound to datasource object (i.e. through InitializeDataSource event). When bound to datasource control, the data caching is handled at datasource control level (through EnableCaching property) and thus no longer need to be handled by WebGrid. For more information about datasource control support, see Declarative DataSource Control.

The version 5.0 has ability to store the cache to physical disk. WebGrid now adds a new option in the DataCacheStorage called “FileServer”. The new FileServer storage option allows you to store the data cache to physical hard drive which has much larger space and can be easily extensible and scalable. You can use CacheServerConnection property to define the path to store the data cache.

Inheritance Hierarchy

System.Object
   System.Web.UI.Control
      System.Web.UI.WebControls.WebControl
         ISNet.WebUI.ISNetControl
            ISNet.WebUI.WebGrid.WebGrid

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

Reference

WebGrid Members
ISNet.WebUI.WebGrid Namespace

Tasks

Walkthrough: Loading child rows on demand based on the selected parent row
Walkthrough: Integrating WebInput in WebGrid
Walkthrough: Applying Late Binding Hierarchical
Walkthrough: Configuring updatable WebGrid bound to ObjectDataSource control
Walkthrough: Binding WebGrid to Hierarchical ISDataSource control
Walkthrough: Binding WebGrid to AccessDataSource control
Walkthrough: Binding WebGrid to ObjectDataSource control
Walkthrough: Binding WebGrid to XMLDataSource control
How-to: Configure SmartWebResources in a new web application
How-to: Bind WebGrid after PostBack (Late Binding)

Concepts

No-codes data binding through DataSourceControl support
No-codes Hierarchical data binding
Rich User Interface Elements
Automatic Data Processing
Advanced User Interactions
Enhanced Client-Server Programmability
WebGrid.NET Component Designer 2.0
Hassle-free deployment through SmartWebResources™ technology
New user interface with new styles
Improved Data Caching (for traditional data binding)

Other Resources

New Features in V5.0
Enhancements
Design-time support for DataSouceControl
Default Style Mode
SmartTag Action Panel

©2012 Intersoft Solutions Corp. All Rights Reserved.