[CLOSED] How to read rows in gridpanel or store from codebehind

  1. #1

    [CLOSED] How to read rows in gridpanel or store from codebehind

    Hi,

    I want to read de rows in the gridpanel or store from code behind, this is for get the information in each rows and save into the database.

    That is for this:

    1.- Load the gridpanel with data
    2.- Select a row and up or down the position of that.
    3.- Update the position of all rows changed in the database.

    thanks a lot.
    Last edited by Daniil; Dec 11, 2014 at 8:03 PM. Reason: [CLOSED]
  2. #2
    Hi @opendat2000,

    This example demonstrates how to submit a GridPanel's data to server.
    https://examples2.ext.net/#/GridPane...mit_Two_Grids/
  3. #3

    get rows in grid panel in codebehind

    .aspx Design Code:

    <ext:Button ID="Button1" runat="server" Text="Submit two grids">
                <DirectEvents>
                    <Click OnEvent="SubmitGrids">
                        <ExtraParams>
                            <ext:Parameter Name="Grid1" Value="Ext.encode(#{GridPanel1}.getRowsValues({selectedOnly : false}))" Mode="Raw" />
                         </ExtraParams>
                    </Click>
                </DirectEvents>
            </ext:Button>
    .cs Code:
    string grid1Json = e.ExtraParams["Grid1"];
    XmlNode grid1Xml = JSON.DeserializeXmlNode("{records:{record:" + grid1Json + "}}");
     Dictionary<string, string>[] grid1Data = JSON.Deserialize<Dictionary<string, string>[]>(grid1Json);
      foreach (IDictionary<string, string> JColumn in grid1Data)
                    {
                     //whatever you want,code here
                     }
    Last edited by Daniil; Dec 11, 2014 at 7:45 AM. Reason: Please use [CODE] tags
  4. #4
    Thanks to both for the replies.

    Now I can get the data.

    Please close the thread.

    Again Thanks to both.

Similar Threads

  1. [CLOSED] GridPanel Store read from Many to Many realtions tables
    By eaglemobile in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Mar 02, 2011, 2:55 PM
  2. Replies: 2
    Last Post: Dec 06, 2010, 2:07 PM
  3. Replies: 1
    Last Post: Nov 01, 2010, 9:00 PM
  4. read gridpanel rows
    By maxdiable in forum 1.x Help
    Replies: 0
    Last Post: Jul 21, 2009, 3:47 AM
  5. Replies: 4
    Last Post: Jan 30, 2009, 2:05 AM

Tags for this Thread

Posting Permissions