Finding a Node based on two key values

4 posts, 0 answers
  1. Madhu
    Madhu avatar
    5 posts
    Member since:
    Apr 2011

    Posted 01 Aug 2011 Link to this post

    I want to find a node on a Treeview based on not the value of the node but based on combination of both value and category as the value field is not unique.

    I am writing the following code and just want to clarify whether it's correct.

      If Not radTree.FindNode(Function(o) o.Value = NodeValue  And  o.Category = "PORT") Is Nothing Then
                node = radTree.FindNode(Function(o) o.Value = NodeValue And o.Category = "PORT")
      End If

    Thanks
    Madhu Rao
  2. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 01 Aug 2011 Link to this post

    Hi Madhu,

     I don't think the code is correct. Simply, you are currently doing the following:

    If (someFunction() is Nothing) Then
       result = someFunction() 'which equals result = Nothing

    Regards,
    Nikolay Tsenkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  3. Madhu
    Madhu avatar
    5 posts
    Member since:
    Apr 2011

    Posted 01 Aug 2011 Link to this post

    I have put a "Not" keyword at the beginning of the statement.
  4. Nikolay Tsenkov
    Admin
    Nikolay Tsenkov avatar
    734 posts

    Posted 03 Aug 2011 Link to this post

    Hi Madhu,

     Sorry about that. I didn't saw the Not in front.

    Then it should fine.

    Regards,
    Nikolay Tsenkov
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top