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
1205
Getting UltraGrid Column Names
posted

Is it possible to loop through the columns of a row and retrieve a column's name?

Thank you.

Parents
No Data
Reply
  • 48586
    Suggested Answer
    posted

    Hello,

     

    UltraGridRow has a Cells collection, that retrieves the cells that are in this row. Each cell object has a Column property that retrieve the owner column of this cell. So you could easy loop through the columns of a row with code like this:

         foreach (UltraGridCell cell in ultraGrid1.Rows[row index].Cells)

                {

                    string ColumnKey = cell.Column.Key;//get column key

                    string ColumnCaption = cell.Column.Header.Caption;// get column caption

                }

     

    Let me know if you have any further questions.

     

Children