Hi, i have a webdatagrid on my page with paging on. now i want select some rows. from page one it works fine. but when i select page 2 or 3 and select a row i got no object. see Image.
WebDataGrid1.Behaviors.Selection.SelectedRows.Count are one, but
WebDataGrid1.Behaviors.Selection.SelectedRows(0) are nothing.that works for Page 1 fine.Grid config are
<ig:WebDataGrid ID="WebDataGrid1" runat="server" Height="500px" Width="99%" EnableViewState="true" AutoGenerateColumns="False" EnableAjax="False" EnableAjaxViewState="False">
<Behaviors>
<ig:Selection RowSelectType="Single" CellClickAction="Row" EnableCrossPageSelection="true"/>
<ig:Paging PagerAppearance="Bottom" PageSize="50" Enabled="true" />
<ig:RowSelectors Enabled="true" RowNumbering="true" />Martin
Hello Martin,
Could you provide more details about when you want to access the selected row and what you would like to do with it? Knowing this information could help me suggest a better approach to meet your requirements.
What you are seeing is the expected behavior when you are using paging with selection. The grid only creates record items for the records that are currently visible. In the case of paging there would only be records created for the current page. Since you are using cross page selection it maintains the count, as well as a few details internally, about the currently selected rows. However, those rows won't be accessible as the grid won't create them until their page is viewed.
Hi, i have found my error. I have place in the Init_grid Function a
WebDataGrid1.Behaviors.Paging.PageIndex = 0
that was my error. Sorry