[CLOSED] how to pass a storeparamenter to a store in directmethod ?

  1. #1

    [CLOSED] how to pass a storeparamenter to a store in directmethod ?

    i want to pass a parameter to a store , in aspx,
       <ext:Store runat="server" ID="storeContract" OnReadData="LoadContract" AutoLoad="False">
                                   <Parameters>
                                       <ext:StoreParameter Name="bid"/>
                                   </Parameters>
    in cs,below set the value for the paramenter in directmethod , then triiger reload of the store.
    [DirectMethod]
     public void ShowBuildW(string buidinfoid)
            {
                var sp = new StoreParameter
                {
                    Name = "bid",
                    Value = buidinfoid
                };
                var pc = new Ext.Net.ParameterCollection();
                pc.Add(sp);
                storeContract.Reload(pc);  
            }
    below , get the parameter's value , but no work.
     protected void LoadContract(object sender, StoreReadDataEventArgs e)
            {
                var bid = e.Parameters["bid"];  
            }
    what's wrong , what I am missing or making a mistake?
    Last edited by Daniil; Jun 08, 2015 at 10:11 AM. Reason: [CLOSED]
  2. #2
    Hi @hdsoso,

    Please remove
    <Parameters>
        <ext:StoreParameter Name="bid" />
    </Parameters>
    or set
    <Parameters>
        <ext:StoreParameter Name="bid" ApplyMode="IfNotExists" />
    </Parameters>

Similar Threads

  1. DirectMethod - how to pass an array parameter
    By tcunha in forum 2.x Help
    Replies: 3
    Last Post: May 21, 2014, 10:17 AM
  2. Replies: 3
    Last Post: Dec 21, 2012, 10:53 AM
  3. [CLOSED] How to pass extraparams tp directmethod?
    By feanor91 in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 19, 2012, 5:00 PM
  4. Replies: 1
    Last Post: Jun 08, 2011, 3:11 AM
  5. [CLOSED] Pass records of a store to a DirectMethod
    By macap in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 14, 2010, 3:00 PM

Posting Permissions