Nov 24, 2009, 11:31 AM
Binding GridPanel's rows dinamcally
Hello,
i have a Store like this:
<ext:Store ID="StoreGriglia" AutoLoad="false" runat="server">
<Proxy>
<ext:HttpProxy Url="Ws.asmx/InsRich_GetData" Method="POST" runat="server"></ext:HttpProxy>
</Proxy>
<Reader>
<ext:XmlReader ReaderID="RIGA_ID" Record="DATI" TotalRecords="TotalResults">
<Fields>
<ext:RecordField Name="IDR" ></ext:RecordField>
</Fields>
</ext:XmlReader>
</Reader>
<BaseParams>
<ext:Parameter Name="start" Value="={0}" />
<ext:Parameter Name="limit" Value="={25}" />
</BaseParams>
</ext:Store>
I use AutoLoad="false" because i want to bind data when i click on a button.Serverside:
myStore.DataSource = myDataTable 'DATA
myStore.DataBind()
myGridPanel.Reload() ' THIS IS NECESSARY OTHERWISE I CAN'T SEE THE ROWS INTO THE GRID
In the Store's declaration you can see the URL "Ws.asmx/InsRich_GetData" that converts data in XML rapresentation.It works, but only if i RELOAD the grid and i have a strong impression that is not so correct.
Definitively, i wanna ask you what is the best method to load data from a store in a second moment.
Thanks!!
Max