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
45
How do you determine the selected row (active row)?
posted

I just want to extract data from the selected row.

It would seem this would be a function of a datagrid (it is of THE Datagrid).

But, I cannot find a complete example so far. I have been reading for some time.

Can someone point me to where there might be a visual c example program?

 

Thank you 

Parents
No Data
Reply
  • 395
    posted

    Hi tschmitz

    To get a reference to the selected row you have first to verify that you have set the DataKeyField-Property of the UltraWebGrid to an apropriate value. Without this it won't work.

    Then you can use the SelectedRows-Collection of the DisplayLayout to get a reference to the selected row(s) as like:

    int addressPk = Convert.ToDecimal(AddressResultGv.DisplayLayout.SelectedRows[0].DataKey);

    Hope this helps

    Regards
    Adrian

Children