Aug 30, 2015, 10:44 PM
[CLOSED] Store c# DataBind() Method in v3.2 problem
hi.
souce code
The second step: I'm adding records to the database manually.
The third step: I click the load button.
I added manually does not come on record.
I added in version 3.0 came on record with manually.
Did changes in version 3.2?
souce code
<ext:ResourceManager runat="server" ShowWarningOnAjaxFailure="false" />
<asp:SqlDataSource ID="sds1" runat="server" ConnectionString="<%$ ConnectionStrings:Con_Test %>"
SelectCommand="SELECT id, col1, col2">
</asp:SqlDataSource>
<ext:Store runat="server" ID="store1" DataSourceID="sds1">
<Model>
<ext:Model runat="server" IDProperty="id">
<Fields>
<ext:ModelField Name="id" Type="Int" />
<ext:ModelField Name="col1" Type="String" />
<ext:ModelField Name="col2" Type="String" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
<ext:GridPanel ID="grid1" StoreID="store1" runat="server">
<ColumnModel runat="server">
<Columns>
<ext:Column runat="server" Text="id" DataIndex="id" Width="55" />
<ext:Column runat="server" Text="col1" DataIndex="col1" Flex="1" />
<ext:Column runat="server" Text="col2" DataIndex="col2" Flex="1" />
</Columns>
</ColumnModel>
</ext:GridPanel>
<ext:Button runat="server" Text="Load">
<Listeners>
<Click Handler="var store = App.store1; App.direct.Store_Load([store.storeId], { eventMask: { showMask: true, msg: 'wait' } });" />
</Listeners>
</ext:Button>
cs code [DirectMethod]
public void Store_Load(string[] comList)
{
foreach (var item in comList)
{
try
{
Store com = this.Page.FindControl(item.ToString()) as Store;
com.DataBind();
}
catch (Exception)
{
}
}
}
The first step: when the page is opened records loaded.The second step: I'm adding records to the database manually.
The third step: I click the load button.
I added manually does not come on record.
I added in version 3.0 came on record with manually.
Did changes in version 3.2?
Last edited by fabricio.murta; Sep 03, 2015 at 11:04 PM.
Reason: [CLOSED]