Is it possible to loop through the columns of a row and retrieve a column's name?
Thank you.
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.
Hi, I need help.
I have a grid, I need to open a diferent form for each column in my grid.
I have now the code for catch the name of the current column in a variable, but... How do I do for compare it with the name of each column.
something like this:
If variablecurrentcolumn = "Column1"
open frm1
if variablecurrentcolumn = "column2"
open form2
Thank you :)
Hi Liz,
Could you please review the sample attached to this post and see if it meets your requirements.Please feel free to let me know if I misunderstood you or if you have any other questions.
I found the answer here:
http://es.infragistics.com/community/forums/t/81076.aspx