Infralution Support Forum Index Infralution Support
Support groups for Infralution products
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Selected Row Cell Value

 
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support
View previous topic :: View next topic  
Author Message
jthompson



Joined: 21 Jul 2006
Posts: 4

PostPosted: Fri Jul 21, 2006 1:34 pm    Post subject: Selected Row Cell Value Reply with quote

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
View user's profile Send private message
Infralution



Joined: 28 Feb 2005
Posts: 5027

PostPosted: Fri Jul 21, 2006 11:42 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
jthompson



Joined: 21 Jul 2006
Posts: 4

PostPosted: Mon Jul 24, 2006 1:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Infralution Support Forum Index -> Virtual Tree Support All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group