Hi,
If somebody could help me determine how to find the current column position of an active cell in contrast to the DataTable or visible/displayed grid.
I found how to get the current row of the activated cell, which is "ultragrid.ActiveCell.Row.VisibleIndex". So I was assuming that I could find the columns in "ultragrid.ActiveCell.Columns" but unfortunately I could not find a particular property that will return it.
Thanks,
Aaron
Hi Aaron,
The visible position of a column is not necessarily straightforward, because of RowLayouts. If you are not using RowLayouts, then you can use cell.Column.Header.VisiblePosition.
Thanks Mike! It worked = )
Hi Mike,
I want to get the selected column header name. for this i need selected column index of that grid.
Please check my following code.
Infragistics.Win.UIElement aUIElement;
aUIElement = ultraGrid1.DisplayLayout.UIElement.ElementFromPoint(new Point(e.X, e.Y));
UltraGridRow tRow;
UltraGridColumn tCol;
tCol = (UltraGridColumn)aUIElement.GetContext(typeof(UltraGridColumn));
tRow = (UltraGridRow)aUIElement.GetContext(typeof(UltraGridRow));
in tRow i am getting the row and index whereas in tCol always nothing when i click on column header. But if i select in grid data then i am getting value in tCol(column index).
But the problem is i need to get column header name.
Ravi