-
24 Sep 2012 11:44 PM #1
Answered: How can I get the id of an expanded node of a treepanel in the ASP side?
Answered: How can I get the id of an expanded node of a treepanel in the ASP side?
Hi,
I have that Model:
And I would like to know how can I get the id of an expended node of my treeStore.PHP Code:Ext.define('EXC.model.TreeStore', {
extend: 'Ext.data.Model',
fields: [
{ name: 'id', type: 'int' },
{ name: 'name', type: 'string' },
{ name: 'leaf', type: 'bool' }
],
proxy: {
type: 'ajax',
actionMethods: {
read: 'POST'
},
api: {
read: '/File/GetFile/'
}
}
});
I tried :But that always return 0.PHP Code:long id = Convert.ToInt64(Request.Form["id"]);
-
Best Answer Posted by vietits
Node id is sent with the param named 'node' not 'id'.
-
24 Sep 2012 11:53 PM #2
Node id is sent with the param named 'node' not 'id'.
-
24 Sep 2012 11:58 PM #3
return NaN for the root node.PHP Code:Request.Form["node"]
-
25 Sep 2012 12:03 AM #4
node param sent in GET
-
25 Sep 2012 12:05 AM #5
That's because your root node does not have an id.
-
25 Sep 2012 12:09 AM #6
Is there no way to send it in POST?
Because the problem is that if I try in GET, I have an error that tells:
This request has been blocked because of sensitive information wich could be transmit to other Web sites when using a GET request. To allow GET requests, set JsonRequestBehavior to the AllowGet value.
-
25 Sep 2012 12:12 AM #7
With your code, request params for reading request are sent by POST not GET.
-
25 Sep 2012 12:13 AM #8
sorry, 4.1.x send node param in POST


Reply With Quote