Version: 1.6.3.0
Ajax technology accesses server-side power using callbacks without reloading the browser page. Easily create Rich Internet Applications without writing JavaScript!

LiveDataGrid ASP.NET Server Control Information

This page includes information about the LiveDataGrid Server Control, which is included in PowerWEB LiveControls for ASP.NET:

[View LiveControl Demo]

The LiveDataGrid emulates the standard ASP.NET DataGrid features/functionality while replacing the standard postback with a remote-scripted callback, resulting in a highly-responsive grid which has the look, feel, and responsiveness of a Windows grid. When performing common grid functions such as sorting columns, selecting pages, selecting rows, etc, these operations are performed without a browser refresh, resulting in a very smooth, Windows-like execution. In addition, editing and updating grid data also occurs without refreshing the page, making data modification much more intuitive and responsive.

Remember! Any LiveControl which raises a callback to the server (such as LiveDataGrid) raises a server event within which ANY client-side element can be visually updated without refreshing the page!

The LiveDataGrid control has the following features:

  • Cross-browser compatible, no plugins, downloads, or security warnings.
  • Standard grid functions such as paging, sorting, editing, selecting, and updating occur using remote-scripting, resulting in lightning-quick data loading on the client-side.
  • Row editing occurs without browser refresh.
  • Bind data on postback and visual update occurs client-side without a refresh.
  • Automatic support for displaying a column of radio buttons used to select rows.
  • Automatic support for displaying a column of checkboxes used to display and modify boolean database data.

Some example uses for LiveDataGrid:

  • Use in conjunction with other LiveControls to build web applications such as contact management, content managment, email, etc which have a Windows look and feel.
  • Use in conjunction with LiveTimer to display tabular data that requires real time updates (such as sports scores, stock info, weather, network data, etc).

Browser Compatibility

LiveControls have been tested and are fully "callback-compatible" in the following browsers:

  • Microsoft Internet Explorer 5.0+ for Windows
  • Microsoft Interner Explorer 5.0+ for Macintosh
  • Netscape 7.1+ for Windows
  • Netscape 7.1+ for Macintosh OS X
  • Mozilla 1.3+ for Windows
  • Mozilla 1.3+ for Macintosh OS X
  • Firefox for Windows
  • Firefox for Macintosh OS X
  • Camino for Macintosh OS X
  • Konqueror based engines
  • Galeon
  • Opera 5.0+

If a browser which is not compatible accesses a page containing LiveControls, the controls will fall back to the standard ASP.NET functionality. For example, a LiveButton issues a transparent callback when clicked. If on a non-compatible page, the button will still be displayed, but will cause a standard postback when clicked.

Server Tag Example

The following tags demonstrate typical settings for a LiveDataGrid.

<cc1:LiveDataGrid id="LiveDataGrid1" runat="server" AutoGenerateColumns="False">
   <Columns>
      <cc1:LiveBoundColumn DataField="ProductID" SortExpression="ProductID" HeaderText="Product ID"></cc1:LiveBoundColumn>
      <cc1:LiveBoundColumn DataField="ProductName" SortExpression="ProductName" HeaderText="Product Name"></cc1:LiveBoundColumn>
      <cc1:LiveBoundColumn DataField="QuantityPerUnit" SortExpression="QuantityPerUnit" HeaderText="Quantity Per Unit"></cc1:LiveBoundColumn>
      <cc1:LiveBoundColumn DataField="UnitsInStock" SortExpression="UnitsInStock" HeaderText="Units In Stock"></cc1:LiveBoundColumn>
      <cc1:LiveButtonColumn Text="LiveButton" HeaderText="Live Buttons" CommandName="Blah"></cc1:LiveButtonColumn>
      <cc1:LiveButtonColumn Text="Delete" HeaderText="Delete Buttons" CommandName="Delete"></cc1:LiveButtonColumn>
      <cc1:LiveEditCommandColumn ButtonType="LinkButton" UpdateText="Update" HeaderText="Edit Buttons" CancelText="Cancel" EditText="Edit"></cc1:LiveEditCommandColumn>
      <cc1:LiveCheckBoxColumn DataField="Discontinued" NonEditModeBehavior="DisabledCheckBox" AutoPostback="False"></cc1:LiveCheckBoxColumn>
   </Columns>
</cc1:LiveDataGrid>

Code-Behind Example

The following code demonstrates handling some typical DataGrid events.

private void LiveDataGrid1_CancelCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
   LiveDataGrid1.EditItemIndex = -1;
}

private void LiveDataGrid1_EditCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
   LiveDataGrid1.EditItemIndex = e.Item.ItemIndex;
}
        
private void LiveDataGrid1_UpdateCommand(object source, System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
   // Insert SQL code for updating your datasource here.
   LiveDataGrid1.EditItemIndex = -1;
}