View Full Version : How can I get the id of an expanded node of a treepanel in the ASP side?

24 Sep 2012, 11:44 PM

I have that Model:

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/'

And I would like to know how can I get the id of an expended node of my treeStore.
I tried :

long id = Convert.ToInt64(Request.Form["id"]);

But that always return 0.

24 Sep 2012, 11:53 PM
Node id is sent with the param named 'node' not 'id'.

24 Sep 2012, 11:58 PM
return NaN for the root node.

25 Sep 2012, 12:03 AM
node param sent in GET

25 Sep 2012, 12:05 AM
That's because your root node does not have an id.

25 Sep 2012, 12:09 AM
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
With your code, request params for reading request are sent by POST not GET.

25 Sep 2012, 12:13 AM
sorry, 4.1.x send node param in POST