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
445
Get a cell value from a line selected in a ultrawebgrid
posted

Hello,

I am starting to use ultrawebgrid, and I have a problem to get a cell value:

My datasource is coming from a service web, and I have one column named KEY. when user selects a line, I would like to get the KEY value in code behind. (I would something like equivalent at :

 

UltraWebGrid1.Rows[UltraWebGrid1.SelectedRowsChange].Cells[1].Text.Trim();

 with a "standard" gridview (where KEY is my first column)

 

How would it be possible to do this?

Thanks for your help

 

 

 

  • 14049
    Offline posted

    The selected rows collection is passed into the SelectedRowChanged event. So your handler for it might look something like this:

          void UltraWebGrid2_SelectedRowsChange(object sender, Infragistics.WebUI.UltraWebGrid.SelectedRowsEventArgs e)

          {

                e.SelectedRows[0].Cells.FromKey("KEY").Text.Trim();

          }