How get a storeparameter value in a DirectMethod Function .. ??

  1. #1

    How get a storeparameter value in a DirectMethod Function .. ??

    Hi .. I am new in programming Ext.Net .. my question is .. how to bind data to the store using a store parameter
    ..
    here is my store, I have a storeparameter .. but How can I acces to the value of the parameter in a [DirectMethod] ?? .. the idea is the I have a direct function, in this funcion I get the storeparameter value, so I can Bind the new data, for the bind I use a TableAdapter GetDataBy("some value") .. so I need the storeparameter value to pass to the TableAdapter.GetDataBy(storeparametervalue) .. Is this possible ?? .. I dont know how obtain the value of the storeparameter in my function .. right now is just like this . I need help :)
    <ext:Store
        ID="stPrestamoAlumno" 
        runat ="server">
        <Model>
            <ext:Model runat="server">
                <Fields>
                    <ext:ModelField Name="EQUIPO"></ext:ModelField>
                    <ext:ModelField Name="MODELO"></ext:ModelField>
                    <ext:ModelField Name="SERIE"></ext:ModelField>
                    <ext:ModelField Name="TIEMPO_SALIDA" Type="Date"></ext:ModelField >
                    <ext:ModelField Name="TIEMPO_ENTRAGA" Type="Date"></ext:ModelField >
                    <ext:ModelField Name="TIEMPO_A_ENTREGAR" Type="Date"></ext:ModelField >
                </Fields>
            </ext:Model>
        </Model>
        <AutoLoadParams>
         <ext:StoreParameter Name="Cuenta" Value="#{txtCuenta}.getValue()" />
        </AutoLoadParams> 
        <Proxy>
           <ext:PageProxy DirectFn="App.direct.BindDataStore" />
         </Proxy>  
        </ext:Store>
    and this is the script :\ .. no idea how to obtain the value ..
    <script runat="server">
             [DirectMethod]
             public void BindDataStore()
             {
               
                StoreParameter sp = new StoreParameter();
    
             }
        </script>
    Last edited by rookie; Sep 19, 2012 at 2:07 PM.
  2. #2
    Hi @rookie,

    Thank you for the question. Seems, there is a problem with that on our side. We will investigate and come back with an update.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @rookie,

    Thank you for the question. Seems, there is a problem with that on our side. We will investigate and come back with an update.
    (: Thank you let me know how it goes
    Apreciatte the help !
  4. #4
    I was wrong it appears to be OK on our side.

    There is the following comment in the source code of this example:
    https://examples2.ext.net/#/GridPane..._DirectMethod/

    /// <summary>
    /// Possible arguments: 
    ///     - string action
    ///     - string action, Dictionary<string, object> extraParams
    ///     - string action, Dictionary<string, object> extraParams, object serviceParams
    /// </summary>
    /// <returns></returns>
    [DirectMethod]
    public static object BindData()
    {
        return Data; 
    }
    So, defining
    [DirectMethod]
    public static object BindData(string action, Dictionary<string, object> extraParams)
    you will be able to get the parameters via the extraParams dictionary.

Similar Threads

  1. Replies: 7
    Last Post: Oct 21, 2014, 6:22 AM
  2. Update StoreParameter from code behind
    By Alexx in forum 2.x Help
    Replies: 0
    Last Post: Apr 28, 2012, 9:35 AM
  3. Replies: 6
    Last Post: Apr 02, 2012, 6:37 PM
  4. Replies: 1
    Last Post: Jan 25, 2012, 8:17 AM
  5. Replies: 0
    Last Post: Jan 11, 2012, 8:30 AM

Posting Permissions