[CLOSED] Get Gridpanel's Store data from code Behind without sending values as parameters

  1. #1

    [CLOSED] Get Gridpanel's Store data from code Behind without sending values as parameters

    Hi I would like to get a gridpanel's store data or items from code behind. I don't want to datas as parameter because the method that have to get this values is not in the same page.
    Somebody can help me?
    Last edited by Daniil; Jan 23, 2014 at 11:37 AM. Reason: [CLOSED]
  2. #2
    Hello!

    As a Premium member you need to post your thread to the Premium Forums. The thread has been moved to the 2.x Premium Help forum.

    About your question, where do you send your data? Is it handler or WebService. However, the only way to send the Grid's data to the server is to use parameters. But how you handle them depends on what and where is the handler.
  3. #3
    The page containning the gridpanel is a step of a wizard.
    Which kind of event should i fire in order to get the gridpanel datas at the end of the wizard? Thoses datas should be sent to the page codebehind in order to build specific objects that will be used later!

    Thanks.
  4. #4
    Quote Originally Posted by AdminAISN View Post
    Which kind of event should i fire in order to get the gridpanel datas at the end of the wizard?
    What do you mean under "end of the wizard"? When a user press the "Finish" button? So, you should get the GridPanel's data on clicking that Finish button. Please clarify are you in trouble to access the GridPanel on the final wizard step? If so, we should know a bit more about the design of your wizard.
  5. #5
    Quote Originally Posted by AdminAISN View Post
    The page containning the gridpanel is a step of a wizard.
    Which kind of event should i fire in order to get the gridpanel datas at the end of the wizard? Thoses datas should be sent to the page codebehind in order to build specific objects that will be used later!

    Thanks.
    You can save the Grid's data into some hidden field or send it as ExtraParam directly. To get the Grid's values you should use getRowsValues function:

    // config :
    //    - selectedOnly
    //    - visibleOnly
    //    - dirtyCellsOnly
    //    - dirtyRowsOnly
    //    - currentPageOnly
    //    - excludeId
    //    - filterRecord - function (record) - return false to exclude the record
    //    - filterField - function (record, fieldName, value) - return false to exclude the field for particular record
    getRowsValues : function (config) {
    If it doesn't clear, could you say how your wizard is organized? I mean do you use CardLayout, how do you want to send your data to the server?
  6. #6

    Solved using Javascript

    Quote Originally Posted by Baidaly View Post
    You can save the Grid's data into some hidden field or send it as ExtraParam directly. To get the Grid's values you should use getRowsValues function:

    // config :
    //    - selectedOnly
    //    - visibleOnly
    //    - dirtyCellsOnly
    //    - dirtyRowsOnly
    //    - currentPageOnly
    //    - excludeId
    //    - filterRecord - function (record) - return false to exclude the record
    //    - filterField - function (record, fieldName, value) - return false to exclude the field for particular record
    getRowsValues : function (config) {
    If it doesn't clear, could you say how your wizard is organized? I mean do you use CardLayout, how do you want to send your data to the server?
    I used Javascript method to send data from Client page to server's directMethod.
  7. #7
    Thank you for the update.

    By the way, here is an example.
    https://examples2.ext.net/#/GridPane...mit_Two_Grids/
  8. #8

    getRowsValues Function Works

    Quote Originally Posted by AdminAISN View Post
    I used Javascript method to send data from Client page to server's directMethod.
    in the javascrip,we can pass data like this:
    MyDirectMethod.MyFunction(gridPanel1.getRowsValues());
    in the codebehind,we can like this:

    MyFunction(Object obj)
    {
            string jsonText = obj.ToString();
            JArray ja = (JArray)JsonConvert.DeserializeObject(jsonText);
            ......
    }
    Last edited by geoffrey.mcgill; Apr 19, 2014 at 5:32 PM. Reason: Please use [CODE] tags
  9. #9
    Hi @zhangkaihua,

    Thank you for sharing that information.

Similar Threads

  1. [CLOSED] HttpWriteProxy sending parameters in querystring
    By tlfdesarrollo in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 01, 2013, 5:48 PM
  2. Replies: 0
    Last Post: Apr 27, 2013, 1:33 PM
  3. Replies: 1
    Last Post: Mar 29, 2012, 10:42 PM
  4. Sending Store Data To Server
    By kumarxlnt in forum 1.x Help
    Replies: 0
    Last Post: Oct 27, 2009, 2:02 AM
  5. Replies: 0
    Last Post: May 20, 2009, 6:59 PM

Tags for this Thread

Posting Permissions