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
4160
How to check the existance of a certain row
posted

Hello

Suppose that one has a band with 3 columns where one of them is the "Primary Key". How can I check if a certain key exists within the data? How can I retrieve a row given the key?

 

Thanks a lot

 

Parents
No Data
Reply
  • 17259
    Offline posted

    You need to loop through the rows.

    var column = grid.DisplayLayout.Bands[0].Columns[columnName];

    foreach (UltraGridRow row in grid.Rows)

        if (row.GetCellValue(column) == myValue)

          ....

Children