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
345
I Need to Make a Row Active in a UltraGrid, with a Guid column value
posted

Hi all,

I have a Guid column(Unique) in Ultragrid .

 

ex: Guid guid="3B0112C1-53CB-47E5-84CC-01694B4FAA5D"

i want to Select / Activate the row which matches the Guidcolumn value with guid (Guid)

 

Thanks,

Manoj kuamr

  • 37774
    Verified Answer
    posted

    The best, and simplest, way to do this is to loop through all the rows in the grid until you find row row that contains a cell with that value:

    UltraGridColumn col = this.ultraGrid1.DisplayLayout.Bands[0].Columns["GUID"];
    foreach (UltraGridRow row in this.ultraGrid1.Rows)
    {
        if ((string)row.GetCellValue(col) == "3B0112C1-53CB-47E5-84CC-01694B4FAA5D")
        {
            row.Activate();
            break;
        }
    }

    -Matt