View Full Version : Gridpanel not showing column names

Feb 16, 2010, 7:05 AM
Hi everyone,

as mentioned, my gridpanel is not showing column names. I have tried to search an other discussion for the same problem on the forum, but i don't find it.
I would ask you if is this a bug or if i have made some error.

Thank you.

markup code

<ext:GridPanel runat="server" ID="GridPanel_ElencoContatti2" Frame="True" StoreID="Store_ElencoContatti" height="430" StripeRows="true" MaxHeight="400">
<ColumnModel ID="ColumnModel_elencocontatti2" runat="server">
<ext:Column ColumnID="IDContatto" Header="Nome" Width="150" DataIndex="IDContatto">
<Renderer Fn="fullName_contatto" />
<ext:Column DataIndex="Comune" Header="Comune/Cittą" Width="100" />
<ext:Column DataIndex="Provincia" Header="Provincia" Width="100" />
<ext:Column DataIndex="Regione" Header="Regione" Width="100" />
<ext:Column DataIndex="Indirizzo" Header="Indirizzo" Width="100" />
<ext:Column DataIndex="CodiceFiscale" Header="Codice Fiscale" Width="100" />
<ext:Column DataIndex="PartitaIva" Header="Partita Iva" Width="100" />
<ext:Column DataIndex="Email" Header="Email" Width="100" />

<ext:RowSelectionModel ID="RowSelectionModel1" runat="server" SingleSelect="true">
<AjaxEvents >
<RowSelect OnEvent="RowSelect_contatto_ElencoContatti" Buffer="250">
<EventMask ShowMask="true" Target="CustomTarget" Customtarget="#{Panel_elencocontatti}" Msg="Loading.."/>
<ext:Parameter Name="myIDContatto_ElencoContatti" Value="this.getSelected().id" Mode="Raw" ></ext:Parameter>


<ext:Store ID="Store_ElencoContatti" runat="server" DataSourceID="ObjectDataSource_ElencoContatti" OnRefreshData="Store_ElencoContatti_Refresh">
<ext:JsonReader ReaderID="IDContatto">
<ext:RecordField Name="IDContatto" />
<ext:RecordField Name="Nome" />
<ext:RecordField Name="Cognome" />
<ext:RecordField Name="Indirizzo" />
<ext:RecordField Name="IDComune" />
<ext:RecordField Name="Comune" />
<ext:RecordField Name="Regione" />
<ext:RecordField Name="Provincia" />
<ext:RecordField Name="CodiceFiscale" />
<ext:RecordField Name="PartitaIva" />
<ext:RecordField Name="Email" />
<Listeners >
<LoadException Handler="Ext.Msg.Alert('ElencoContatti - Load Failed', e.message || response.status.text);" />

code behind for the ObjectdataSource (surely the problem is not on the SQL query, because i've tested it)

Public Function get_ElencoContatti() As System.Data.DataView

objDataAdapter.SelectCommand = New System.Data.SqlClient.SqlCommand
objDataAdapter.SelectCommand.Connection = objConnection
objDataAdapter.SelectCommand.CommandText = "SELECT C.IDContatto, C.Nome, C.Cognome, C.Indirizzo, C.IDComune, A.Comune, A.Regione, A.Provincia, C.CodiceFiscale, C.PartitaIva, C.Email " &amp; _
"FROM Contatto As C " &amp; _
"INNER JOIN AssegnazioneUtenti$ As A On C.IDComune = A.ID "
objDataAdapter.SelectCommand.CommandType = System.Data.CommandType.Text
If objConnection.State = System.Data.ConnectionState.Closed Then
End If
objdataSet_ElencoContatti = New System.Data.DataSet
objDataAdapter.Fill(objdataSet_ElencoContatti, "elencocontatti")

objDataView_ElencoContatti = New System.Data.DataView(objdataSet_ElencoContatti.Tab les("elencocontatti"))
Return (objDataView_ElencoContatti)
End If
end function

Feb 16, 2010, 12:17 PM
I don't want to have my problem fixed by anyone...

simply, i would know only if there is a known Gridpanel bug...

Feb 16, 2010, 1:43 PM

Try the following to help with debugging:

1. Place <ext:GridPanel> below <ext:Store> in markup.

2. Comment out <SelectionModel>

3. Should be Ext.Msg.alert, instead of Ext.Msg.Alert. Notice lowercase 'a' on 'alert'

4. Remove Columns and/or RecordFields until you get something to render.

Hope this helps.

Feb 16, 2010, 1:54 PM

i'll try your suggestions,

thank you.