[CLOSED] GridPanel getState() gets only column ID

  1. #1

    [CLOSED] GridPanel getState() gets only column ID

    Hello,
    My Button gets grid state like this:
     <ext:Button runat="server" ID="btnSubmitSettings" Hidden="False" Cls="list-button"
                                        Icon="ScriptSave" ToolTip="Save table" Width="30">
                                        <DirectEvents>
                                            <Click OnEvent="btnSubmitSettings_Click">
                                                <ExtraParams>
                                                    <ext:Parameter Name="setting" Value="Ext.encode(#{GridPanelMain}.getState())"
                                                        Mode="Raw">
                                                    </ext:Parameter>
                                                </ExtraParams>
                                            </Click>
                                        </DirectEvents>
                                    </ext:Button>
    and on the server side:
     protected void btnSubmitSettings_Click(object sender,DirectEventArgs e)
            {
                string json = e.ExtraParams["setting"];
    }
    but the json string looks like this:
    "{\"columns\":[{\"id\":\"header-1296\"},{\"id\":\"ctl00_siteContent_dlInvoices_Column_Number\"},{\"id\":\"ctl00_siteContent_dlInvoices_Column_ContractNumber\"},{\"id\":\"ctl00_siteContent_dlInvoices_Column_ContractorName\"},{\"id\":\"ctl00_siteContent_dlInvoices_Column_Date\"},{\"id\":\"ctl00_siteContent_dlInvoices_Column_Settled\"},{\"id\":\"ctl00_siteContent_dlInvoices_Column_GrossValue\"},{\"id\":\"ctl00_siteContent_dlInvoices_Column_Desc\"}],\"storeState\":{\"sorters\":[{\"root\":\"data\",\"property\":\"Settled\",\"direction\":\"ASC\"}]}}"
    Why there is no width parameter? By the way GridPanel is generated dynamic, if it make any difference.
    Last edited by Baidaly; Dec 10, 2013 at 10:40 PM. Reason: [CLOSED]
  2. #2
    Hi @ViDom,

    It doesn't put a Column's Width into the state if it equals the initial Width. If you change a column's width, it should be in the state.
  3. #3
    In Ext.NET v 1.X it was functioning in the same way?
  4. #4
    Hello!

    No, in Ext.NET 1.x the state always has width value of each column. But it's unnecessary information if you don't change initial width because you always know initial width.
  5. #5
    Ok, you are right, it's not a problem.
    Thread can be closed

Similar Threads

  1. Replies: 6
    Last Post: Mar 24, 2014, 7:03 AM
  2. Replies: 0
    Last Post: Sep 27, 2012, 6:10 PM
  3. [CLOSED] Save ext:GridPanel.getState() in SQL Server database
    By supera in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: May 03, 2012, 11:17 AM
  4. [CLOSED] Icon column in GridPanel based on column from store
    By jmcantrell in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: May 12, 2010, 5:46 PM
  5. Replies: 3
    Last Post: Apr 08, 2010, 7:16 AM

Posting Permissions