NodeClick and MultipleSelect='true' not firing

7 posts, 0 answers
  1. Guido Tapia
    Guido Tapia avatar
    87 posts
    Member since:
    Jul 2012

    Posted 14 Dec 2008 Link to this post

    Hi,

    When a TreeView has MultipleSelect='true' the Control+Click node selections are not being fired.

    I think this is a recent bug as this used to work in older versions of the Telerik.Web.UI library (Not sure which version started this bug).

    This is very easy to reproduce. Eg:

    Thanks

    Guido Tapia

    <

     

    div>

     

     

    <telerik:RadScriptManager ID="sm" runat="server" />

     

     

    <telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />

     

     

    <script runat="server">

     

     

    protected void RadTreeView1_NodeClick(object sender, RadTreeNodeEventArgs e)

     

    {

    lblClicked.Text = e.Node.Text +

    " CLICKED";

     

    }

     

    </script>

     

     

    <asp:Label runat="server" ID="lblClicked" />

     

     

    <telerik:RadTreeView ID="RadTreeView1" runat="server" Height="400px" Width="300px" EnableDragAndDrop="true"

     

     

    Skin="Office2007" OnNodeClick="RadTreeView1_NodeClick" MultipleSelect="true">

     

     

    <Nodes>

     

     

    <telerik:RadTreeNode Text="Books" Expanded="true">

     

     

    <Nodes>

     

     

    <telerik:RadTreeNode Text="Arts" />

     

     

    <telerik:RadTreeNode Text="Biographies" />

     

     

    <telerik:RadTreeNode Text="Children's Books" />

     

     

    </Nodes>

     

     

    </telerik:RadTreeNode>

     

     

    </Nodes>

     

     

    </telerik:RadTreeView>

     

     

    </div>

     

  2. Guido Tapia
    Guido Tapia avatar
    87 posts
    Member since:
    Jul 2012

    Posted 16 Dec 2008 Link to this post

    I have posted this as a support ticket (180451) as this is becoming very high priority for me.

    Apologies for the duplication.
  3. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 17 Dec 2008 Link to this post

    Hello Guido Tapia,

    Actually this is by design. You have enabled MultipleSelect property, so you expect the user to select multiple nodes. If the treeview fires the NodeClick server event on every node click in this case, then the user will not be able to select multiple nodes at once, because after the first click the page will postback.

    So, having MultipleSelect set to True clicking on a node while holding the Ctrl or Shift keys will not fire the NodeClick event.

    Note that in this case the client-side events do fire: OnClientNodeClicking and OnClientNodeClicked.

    Best wishes,
    Veselin Vasilev
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  4. Guido Tapia
    Guido Tapia avatar
    87 posts
    Member since:
    Jul 2012

    Posted 17 Dec 2008 Link to this post

    That does not sound correct for many reasons:

    - This did not use to happen at least not in the non-promethious version.
    - If I attach a NodeClick event handler to a node I expect to be notified of NodeClicks (as It used to)
    - A postback between ctrl clicks would interfere with the UI, however a callback would still make it possible (as it used to)

    This is very similar to a multi select list.  If you attach a SelectionChanged listener you expect to be notified of selection changes, no?

    I will attach a client side listener and force the callback but I still say that this is a bug.

    Thanks

    Guido Tapia
  5. Manoj
    Manoj avatar
    75 posts
    Member since:
    Dec 2008

    Posted 06 Jan 2009 Link to this post

    Hi Guido,
        Can you tell me how you did it ?
    With Thanks & Regards
    Manoj
  6. Guido Tapia
    Guido Tapia avatar
    87 posts
    Member since:
    Jul 2012

    Posted 06 Jan 2009 Link to this post

    Hi Manoj,

    I just called 

    __doPostBack(sender.get_id(), '

    ');

    In the OnClientNodeClicked method.

    In the Page_Load I then just check if sender is the tree.

    Guido

     

  7. Manoj
    Manoj avatar
    75 posts
    Member since:
    Dec 2008

    Posted 07 Jan 2009 Link to this post

    Hi Guido,
        Can you attached the code here which we have written in your page . I tried the same but it is not working.

    Regards
    Manoj
Back to Top