Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Link destination treeviewitem on the TreeViewNode. (Read 2005 times)
DKHMM
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Dec 7th, 2009
Link destination treeviewitem on the TreeViewNode.
Mar 8th, 2010 at 1:55pm
Print Post  
Hi

I have a TableNode and a TreeViewNode, when I create a link between the tablenode (Origin) and the TreeViewNode (Destination)
I have difficuties getting the destination treeviewitem on the TreeViewNode.
The origin can be found (line 5)
But I cannot get the TreeViewItem the same way, please let me know how to get this.

private void LinkCreatedEvent(object sender, LinkEventArgs e)
{
TableNode originTableNode = e.Link.Origin as TableNode;
TreeViewNode targetTreeViewNode = e.Link.Destination as TreeViewNode;
var OriginFieldName = originTableNode[1, e.Link.OriginIndex].Text;
var targetFieldName = ????
}
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Link destination treeviewitem on the TreeViewN
Reply #1 - Mar 8th, 2010 at 3:08pm
Print Post  
Hi,

Try using the following method for now:

Code
Select All
var treeNode = e.Link.Destination as TreeViewNode;
var endPoint = e.Link.ControlPoints[e.Link.ControlPoints.Count - 1];
Debug.WriteLine(treeNode.ItemFromPoint(endPoint, true).Label); 



We'll implement a more consistent way to get the item in the version we are currently releasing.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
DKHMM
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 4
Joined: Dec 7th, 2009
Re: Link destination treeviewitem on the TreeViewN
Reply #2 - Mar 8th, 2010 at 3:14pm
Print Post  
Thanks for your quick reply.

It works for now !

Best Regards
Henrik
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint