View previous topic :: View next topic |
Author |
Message |
jthompson
Joined: 21 Jul 2006 Posts: 4
|
Posted: Fri Jul 21, 2006 1:34 pm Post subject: Selected Row Cell Value |
|
|
I'm just getting started with this product and can't seem to find a way to determine a cell value for the selected row. I do not see a property for value. The only time I've been able to access a cell value is during the GetCellData event. I would like to be able to determine the value of any column for selected row during the SelectionChanged event. I'm sure this is simple, but I can't find any examples. Your assistance is appreciated. |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Fri Jul 21, 2006 11:42 pm Post subject: |
|
|
You can obtain the item the selected row is bound to from the SelectedItem property (or SelectedRow.Item). Since you set up the binding between the columns and properties of the item you would normally know which property corresponds to a given column and you just retrieve the property value directly from your item.
Sometimes you may need information about the cell that the mouse is currently over. You can obtain this by calling GetWidget method to retrieve the CellWidget (see http://www.infralution.com/phpBB2/viewtopic.php?t=427&highlight=getwidget+cellwidget). Once you have the CellWidget you can use the CellData property to get the value in the cell. _________________ Infralution Support |
|
Back to top |
|
|
jthompson
Joined: 21 Jul 2006 Posts: 4
|
Posted: Mon Jul 24, 2006 1:44 pm Post subject: |
|
|
Okay, I've got it now. After playing around I found that I was not using the correct object type. Here is what worked for me:
Dim sItem as System.Data.DataRow = _virtualTreeObj.SelectedItem
Dim dataValue as Int16 = sItem.Item("ID")
Thanks for your help. |
|
Back to top |
|
|
|