The official release of Ext.NET Mobile is now available. Ext.NET Mobile is an ASP.NET component framework for building Phone and Tablet specific mobile web applications. Read More

Code behind ExtraParams

  1. #1

    Code behind ExtraParams

    In Code behind you can nicely hook an event on TreePanel
    like this
     Ext.Net.TreePanel tr = new Ext.Net.TreePanel();
     tr.DirectEvents.Click.Event += nodeClicked;
    however if lets say node has attributes how we pass it on extra params ???
      Ext.Net.Parameter prm = new Ext.Net.Parameter();
      prm.Value ="{#{" + tr.ID + "}.node.attributes.tagName}"; //this does not work. Any ideas????
      prm.Name = "ReportID";
      tr.DirectEvents.Click.ExtraParams.Add(prm);
  2. #2
    Hi,

    Is this code throwing a JavaScript error? If you use Firefox with the Firebug extension, does Firebug log any errors or exceptions?

    What if you use the following:

    Example

    Ext.Net.Parameter prm = new Ext.Net.Parameter();
    prm.Value = "#{" + tr.ID + "}.node.attributes.tagName"; //this does not work. Any ideas????
    prm.Name = "ReportID";
    prm.Mode = ParameterMode.Raw;
    tr.DirectEvents.Click.ExtraParams.Add(prm);
    Providing a simplified code sample demonstrating the whole scenario will help narrow down the problem.
    Geoffrey McGill
    Founder & CEO
  3. #3
    Thank you for replying
    previously the the parameter was not coming as numeric value but as whole statement so if i wanted to consume extra parameter it was something like "node.attributes.tagName" after adding prm.Mode = ParameterMode.Raw; Script fails to load. Firebug gives a message missing : after id
    the scenarion is that when the tree is created I am adding some custom attributes to leaf nodes . like this
    trNode.CustomAttributes.Add(new ConfigItem(string.Format("'{0}'", xAttr.Name), string.Format("'{0}'", xAttr.Value)));
    when user clicks the leaf node I want to consume that attributes so hook up direct event
     tr.DirectEvents.Click.Event += nodeClicked;
     tr.ID = xNode.Name;
     Ext.Net.Parameter prm = new Ext.Net.Parameter();
     prm.Value = "{ #{" + tr.ID + "}.node.attributes.ReportID } ";
     prm.Name = "ReportID";
     prm.Mode = ParameterMode.Raw;
     tr.DirectEvents.Click.ExtraParams.Add(prm);

Similar Threads

  1. Replies: 6
    Last Post: Aug 01, 2011, 4:53 PM
  2. AjaxFormResult && ExtraParams
    By threewonders in forum 1.x Help
    Replies: 1
    Last Post: Jun 28, 2011, 7:30 AM
  3. more than one extraparams from a gridpanel
    By unaltro2 in forum 1.x Help
    Replies: 1
    Last Post: Jun 07, 2011, 4:35 PM
  4. Combobox value with ExtraParams
    By ulrikn in forum 1.x Help
    Replies: 1
    Last Post: Feb 09, 2011, 10:46 AM
  5. How to use ExtraParams ?
    By iscript in forum 1.x Help
    Replies: 1
    Last Post: Aug 21, 2009, 7:09 AM

Posting Permissions

Subscribe now to get the latest Ext.NET happenings in our newsletter.