[CLOSED] [1.0] GridPanel nested in a Panel doesn't work

  1. #1

    [CLOSED] [1.0] GridPanel nested in a Panel doesn't work



    k Hi,
    i resolved a problem on a gridpanel but i haven't understood the strange behaviour.

    Consider this original code:

    <ext:Panel ID="PnlGriglia" runat="server" Height="300" Title="Title">
        <Content>
            <ext:FitLayout runat="server" ID="GrigliaFitLayout">
                <Items>
                    <ext:GridPanel ID="GrigliaDati" runat="server" StoreID="StoreGriglia" Title="XXXXXXX">
                        <SelectionModel>
                            <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
                            </ext:RowSelectionModel>
                        </SelectionModel>
                        <ColumnModel runat="server" ID="COLMOD1">
                            <Columns>
                                <ext:Column DataIndex="RIGA_ID" ColumnID="RIGA_ID" Header="ID" Hidden="true" />
                            </Columns>
                        </ColumnModel>
                        <BottomBar>
                            <ext:PagingToolbar ID="PagingToolBar1" runat="server" PageSize="20" AfterPageText="di {0}"
                                BeforePageText="Pagina" DisplayInfo="true" DisplayMsg="Record: {0} - {1} di {2}"
                                Cls="qcTBBar" EmptyMsg="Nessun dato" />
                        </BottomBar>
                    </ext:GridPanel>
                </Items>
            </ext:FitLayout>
        </Content>
    </ext:Panel>
    
    This generate me several problems like the data isn't populated into grid.

    But... The following code works perfectly

    <ext:GridPanel ID="GrigliaDati" runat="server" StoreID="StoreGriglia" Title="XXXXXXX">
        <SelectionModel>
            <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
            </ext:RowSelectionModel>
        </SelectionModel>
        <ColumnModel runat="server" ID="COLMOD1">
            <Columns>
                <ext:Column DataIndex="RIGA_ID" ColumnID="RIGA_ID" Header="ID" Hidden="true" />
            </Columns>
        </ColumnModel>
        <BottomBar>
            <ext:PagingToolbar ID="PagingToolBar1" runat="server" PageSize="20" AfterPageText="di {0}"
                BeforePageText="Pagina" DisplayInfo="true" DisplayMsg="Record: {0} - {1} di {2}"
                Cls="qcTBBar" EmptyMsg="Nessun dato" />
        </BottomBar>
    </ext:GridPanel>
    As you can see i removed the external Panel.

    The code for columns and data is:

    For Each it As ClColonnaGriglia In ListaColonneGriglia.Lista 
        If (IsAjaxRequest) Then
            StoreGriglia.AddField(New Ext.Net.RecordField(it.datafield))
        Else
            StoreGriglia.Reader.Reader.Fields.Add(New Ext.Net.RecordField(it.datafield))
        End If
    
    
        Dim col As New Ext.Net.Column()
        col.DataIndex = it.datafield
        col.Header = it.intestazione
    
    
        GrigliaDati.AddColumn(col)
        GrigliaDati.ColumnModel.Columns.Add(col)
    Next
    
    
    If (IsAjaxRequest) Then
        GrigliaDati.Reconfigure()
    End If
    
    
    
    StoreGriglia.DataSource = dt ' DATATABLE CORRECTLY POPULATED
    StoreGriglia.DataBind()
    Hope someone can help me!

    Thanks!!
  2. #2

    RE: [CLOSED] [1.0] GridPanel nested in a Panel doesn't work

    Hi Polo,

    Setting Height="300" on the GridPanel should cause the rows to render. The GridPanel needs to be configured with a fixed height, or managed by a Layout from another Container.


    Hope this helps.


    Geoffrey McGill
    Founder
  3. #3

    RE: [CLOSED] [1.0] GridPanel nested in a Panel doesn't work

    As well, with v1.0, you can set the .Layout property and remove the inner Layout Control.

    Example

    <ext:Panel ID="PnlGriglia" runat="server" Height="300" Title="Title" Layout="Fit">
        <Items>
            <ext:GridPanel ID="GrigliaDati" runat="server" StoreID="StoreGriglia" Title="XXXXXXX">
    Just a minor performance enhancement I noticed might help.


    Geoffrey McGill
    Founder

Similar Threads

  1. GridPanel Renderer doesn' work
    By AlexMaslakov in forum 1.x Help
    Replies: 2
    Last Post: Aug 25, 2011, 12:46 PM
  2. [CLOSED] GridPanel Cell Tooltips doesn't work in user control
    By skisly in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 09, 2011, 1:57 PM
  3. [CLOSED] GridPanel Row Tooltip ShowDelay doesn't work.
    By drkoh in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 06, 2010, 4:05 PM
  4. GridPanel AutoScroll doesn't work when empty
    By dbassett74 in forum 1.x Help
    Replies: 2
    Last Post: May 24, 2009, 11:03 PM
  5. Replies: 2
    Last Post: Nov 04, 2008, 12:28 AM

Posting Permissions