Hi,
I am new to programming, and I am currently studying at a college in South Africa. I downloaded a trial version of Infragistics NetAdvantage.
I have created an Ultragrid called "UltraGrid1" and it is binded to a datasource called "UltraDataSource1".
Now I know this might sound like a stupid question, but I have tried for two days now to just get the following to work: I would like to click on a specific row, and the then after clicking on "button1", a messagebox should appear giving me the value from a specific column in the selected row.
Could anyone please help me, this will clear things up for me, I have to hand in a project, and if I can get this to work, the college will buy me a full version.
Regards
The rows that is activated when you click on it is returned by the control's ActiveRow property. The datatype of the rows displayed in the grid is UltraGridRow; this class exposes a Cells collection. You can index into this collection using the key of the associated column, and the resulting UltraGridCell instance exposes a Value property.
Thank you for your reply, but I am still struggling. Would you be able to post a simple example please?
Thank you again.
Thank you!
Try something like this:
MessageLabel2.Text = UltraGrid1.ActiveRow.Cells("NameOfColumn").Value.ToString
Replace the NameOfColumn with the name of your column. You can alternatively use an index (starting at 0 first one, 1 for the second and so on) to reference which cell you want instead of a column name.
This is what I have got so far:
Dim
Integer
i = UltraGrid1.ActiveRow.Index
MessageLabel2.Text = UltraGrid1.Selected.Rows(0, i).Value
But this creates an error.