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
575
I Can't get the selected rows in a WebHierarchicalDataGrid using Grid.Behaviors.Selection.SelectedRows
posted

Hi.

I'm using Visual Studio 2012 and NetAdvantatge 12.2 ASP.NET CLR 4

I use a WebHierarchicalDataGrid with an additional band. I allowed selection for the whole grid, but when I try to get the selected row (in server side), the SelectedRows.Counts is always 0.

 

This is the control definition:

 

 <ig:WebHierarchicalDataGrid ID="Grid" runat="server" Width="600px" AutoGenerateBands="False" AutoGenerateColumns="False" DataSourceID="DSEstocs" Key="Articles" DataKeyFields="CodigoArticulo">

    <Columns> .... <Columns/>

    <Bands> .... <Bands/>

    <Behaviors>

        <ig:Selection CellClickAction="Row" RowSelectType="Single"/>

  <Behaviors/>

<ig:WebHierarchicalDataGrid/>

 

And when I try to get the selected row:

 

if (Grid.Behaviors.Selection.SelectedRows.Count > 0)

{

...

}

else if (Grid.Bands[0].BandHasBehaviors && Grid.Bands[0].Behaviors.Selection.SelectedRows.Count > 0)

{

...

 

SelectedRows.Count returns always 0.

 

Can you help me ?

 

Thanks in advance.