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
70
Retrieve data from selected row cells
posted

How do you retrieve data from a specific cell in a selected row?  With the ultrawebgrid control, I used to do something like this:

e.Row.Cells.FromKey("ColumnName").Value

With the webdatagrid control, I saved all the selected rows in a SelectedRowCollection variable.  How do I access the data, as I did above, for a specific cell in a row in that collection?

Thanks!

Parents
No Data
Reply
  • 33839
    posted

    It depends upon whether you are accessing a cell on the client or server.

    Assuming you have the row on the server- row.Items["key"] or row.Items[0] gives you a GridRecordItem

    On the client, you can get a cell by index, column key, or column reference off a row as follows.

    row.get_cell(0), row.get_cellByColumnKey("key"), row.get_cellByColumn(keyCol)

    Off of the cell, you can get text by .Text on the server or .get_text() on the client.

     

    regards,

    David Young

Children