rowIndex = this.ultraGrid1.ActiveCell.Row.Index;
I'm not sure why this is happening, since the same code works for me when I tested it when all but one row was filtered out. Is the null reference exception coming from your code (i.e. "this.ultraGrid1.Rows[rowIndex]" returning null) or from somewhere inside the grid?
-Matt
6 of 1, half dozen of the other, this works for me.
string s = ultraGrid.ActiveRow.Cells["TransactionID"].Text;
And while I'm here, I'm on my 2nd day of evaluation. One thing causing me confusion, and the reason I ended up here in the forums, I was expecting the above line of code to be written as
string s = ultraGrid.ActiveRow.Columns["TransactionID"].Text;
I basically wanted to be able to read any of the column values for the currently selected row. I guess I have to use "Cells" not "Columns" for this, but what I don't understand is, there is a "Columns" property, albeit,
ultraGrid.ActiveRow.Band.Columns["TransactionID"]
What I don't understand is why I can't read the column value out of the columns collection. And why "Cells" seems to be used as what I call a "Column". Any insight on the difference between "Cells" and "Columns" in the grid would be appreciated.
Thanks.
A column is an entire columns. It's a range of cells representing the same cell in each row. A cell is a single cell - it is the intersection of a row and a column.
this.ultraGrid.DisplayLayout.Bands[0].Columns["Column"]
Regards,
pgr2007
Hi,I got when I am getting exception. If I have sorted(grouped) the grid based on any column exception is thrown otherwise none.