Auto Post Back Events
The WebDataGrid™ has behaviors that do not post back by default but you may want to trigger a postback automatically. For this reason, the behavior exposes an AutoPostBack property that you can set to trigger the correpsonding server-side event.
The following lists the behaviors that have the AutoPostBack property and the events that they trigger.
-
Activation - ActiveCellChanged event is raised when a cell is activated.
-
Column Resizing - ColumnResized event is raised when a column is resized.
-
Selection - CellSelectionChanged, ColumnSelectionChanged, or RowSelectionChanged is raised when a cell is selected.
If you have Ajax enabled, then the events are raised asynchronously; if not, you will get a full page postback.
The following code shows you how to set the AutoPostBack property for cell selection and handle the CellSelectionChanged event.
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="350px" Width="400px"
oncellselectionchanged="WebDataGrid1_CellSelectionChanged" >
<Behaviors>
<ig:Selection>
<AutoPostBackFlags CellSelectionChanged="True" />
</ig:Selection>
</Behaviors>
</ig:WebDataGrid>