This is a migrated thread and some comments may be shown as answers.

How to deliver two params when I remote data with AJAX

1 Answer 17 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Chenkai
Top achievements
Rank 1
Chenkai asked on 15 May 2014, 08:14 AM
   ds_par is the first node, and when I collapsed, I want to deliver two params to remote method like "public Node GetNode(string id, string name)", How can I to complete it? Thanks.

<script>

    var ds_sub={
        transport:{
           read:{url:"http://......"},
           dataType:"json",
           data:{ how to use params of parent}
        },
       schema:{ 
          model:{
              NodeId:"NodeId",
             NodeName:"NodeName"
            }
    }
    var ds_par={
         transport:{
           read:{url:"http:...."}
        },schema:{model:{children:"ds_sub"}}
     }


</script>

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 19 May 2014, 07:42 AM
Hi Chenkai,

This could be achieved by subscribing to the TreeView's collapse event. Once the event is triggered you can get the collapsed node through the handler's arguments and its respective dataItem, then pass it to the server using an AJAX request.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
TreeView
Asked by
Chenkai
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or