Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
5549
New Issue with Webdatagrid . Paging and get selected Row from Page2
posted

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

Parents
  • 8421
    posted

    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.

Reply Children
No Data