LiveGrid Configuration

Firstly the dll containing the control should be added to the VS.NET toolbox. Next you can start customizing the control onto the design surface as well as in source view or code behind.

LiveGrid is composed of 2 parts: the server control that mainly transforms properties into js initialization and a http handler that takes care of data feeding. The http handler needs to be custom for each instance of LiveGrid, therefore a base http handler is provided to be inherited and registered. The base http handler implements a generic mechanism that takes care of:

  • Fires an action requested event (named CommandClick) before data needed;
  • Fires the event where data is needed;
  • Fires a data bound event for each row of the requested data.

The custom http handler needs to be registered in Web.config file so the ASP.NET application knows where to direct the grid data requests.

<httpHandlers>
   <add path="MeaningfullName.axd" verb="*" type="SomeNamespace.MyDataProvider, SomeNamespace" />
</httpHandlers>

Next, the http handler name should be assigned to the grid:

<piece: LiveGrid ID="LiveGrid1" runat="server" DataProvider="MeaningfullName.axd" />

For the moment LiveGrid doesn't support skinning since there are too many css classes hardcoded directly into js but this si a small drawback. You can define individual CSS classes for the grid columns.