How to get post back on webdatagrid when selected row is changed ?
Webdatagrid have that even ?
Jiten,
Yes, Infragistics WebdataGrid do have server side event called WebDataGrid1_RowSelectionChanged, ColumnSelectionChanged & CellSelectionChanged event. These events can be visible after you have enabled the Selection Behavior using Smart Tag -> Edit Behavior and then check the checkbox of Selection and you will find in property window the SelectionChanged events.
You can also refer help article from Infragistics:
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.1/CLR3.5/html%5CWebDataGrid_Enabling_Selection.html
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.1/CLR3.5/html%5CInfragistics35.Web.v9.1~Infragistics.Web.UI.GridControls.WebDataGrid~RowSelectionChanged_EV.html
http://help.infragistics.com/Help/NetAdvantage/ASPNET/2009.1/CLR3.5/html%5CInfragistics35.Web.v9.1~Infragistics.Web.UI.GridControls.WebDataGrid~CellSelectionChanged_EV.html
Thank you.
Bunty :)
Thanks for reply
But still not get it , I added that selection tag and also add that rowchanged event but page did't post back
pelase Give me any working exmple
WebDataGrid1.RowSelectionChanged
Sub
<ig:WebDataGrid ID="WebDataGrid1" runat="server" AutoGenerateColumns="False"
DataSourceID="SqlDataSource1" Height="350px" Width="400px"
EnableDataViewState="True">
<Columns>
<ig:BoundDataField DataFieldName="FIRST_NAME" Key="FIRST_NAME">
<Header Text="FIRST_NAME" />
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="MIDDLE_NAME" Key="MIDDLE_NAME">
<Header Text="MIDDLE_NAME" />
<ig:BoundDataField DataFieldName="LAST_NAME" Key="LAST_NAME">
<Header Text="LAST_NAME" />
</Columns>
<Behaviors>
<ig:Selection RowSelectType="Single">
</ig:Selection>
<ig:RowSelectors RowNumbering="True">
</ig:RowSelectors>
<ig:Paging PagerMode="NumericFirstLast">
</ig:Paging>
</Behaviors>
</ig:WebDataGrid>
Has this been changed yet? I am trying to update labels based on the selected row of the grid. I see in the samples browser that is needs to explicitly call the __dopostback('updatepanel clientid') for the update panel. I can get it to postback but only by using __dopostback() with no parameters so it causes a flicker as the entire page is refreshed. Is there some better way built in to handle this?Thanks
- Sarah
Hi Sarah,
In the latest versions of each release for the WebDataGrid, the Selection and Activation behaviors had Autopostback flags added to them. When set to true, it will postback to the server when the client changed event fires. Whether it is ajax or not is determined by the EnableAjax property of the grid. Because you actually want information to come back, you'll need a full page postback. You'll probably want to wrap the data grid inside of an update panel.
<ig:Selection Enabled="true" CellSelectType="Multiple" RowSelectType="Multiple" ColumnSelectType="Multiple"> <AutoPostBackFlags CellSelectionChanged="true" RowSelectionChanged="true" ColumnSelectionChanged="true" /> </ig:Selection>
Hope this helps.
regards,David Young
I have the same with the WebDataGrid. The postback occurs,but the event never fires.
I've tried implementing this with a WebHierarchicalDataGrid but the server side events simply don't fire.Have tried within and outwith an UpdatePanel
I tried with Enabled="true" and both EnableAjax="true" and EnableAjax="false".
With EnableAjax="false" a page postback occurs but the events don't fire. With EnableAjax="true"nothing seems to happen.
Would it be possible to provide a simple complete working example with the WebHierarchicalDataGrid?