Apr 12, 2016, 11:08 AM
XmlNodeList Gridpanel
Hi,
i have a xml file and i want to bind a store to it.
.aspx
Why?
Thanks
i have a xml file and i want to bind a store to it.
.aspx
<ext:GridPanel ID="lista_righe" runat="server">
<Store>
<ext:Store runat="server">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="NumeroLinea" />
<ext:ModelField Name="Descrizione" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
<ColumnModel>
<Columns>
<ext:Column ID="col1" runat="server" DataIndex="NumeroLinea" Text="#" />
<ext:Column ID="Column1" runat="server" DataIndex="Descrizione" Text="Descrizione" />
</Columns>
</ColumnModel>
</ext:GridPanel>
.csprotected void Page_Load(object sender, EventArgs e)
{
XmlDocument doc = new XmlDocument();
doc.Load(...);
XmlNodeList righe = doc.SelectNodes(...);
Store s = lista_righe.GetStore();
s.DataSource = righe;
s.DataBind();
}
The problem is that grid see the rows but all cell are empty.Why?
Thanks