Mar 14, 2017, 4:34 PM
[CLOSED] Load Textfields in formpanel from Store in Window
Hello,
I want to load the values of textfields from the database. I tried to follow this example:https://examples4.ext.net/#/Form/Mis...ous/Form_View/
But it doesnt load them. Here is what I have done:
DocSearch.ascx
I want to load the values of textfields from the database. I tried to follow this example:https://examples4.ext.net/#/Form/Mis...ous/Form_View/
But it doesnt load them. Here is what I have done:
DocSearch.ascx
<ext:Store ID="EditDocStore" runat="server" OnReadData="EditDocStore_ReadData" >
<Model>
<ext:Model ID="Model2" runat="server">
<Fields>
<ext:ModelField Name="docFirstName" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
<ext:Window ID="wndEditDoctor" runat="server" Title="Edit Doctor" Hidden="true" Layout="FitLayout" Width="500" Height="750">
<Listeners>
<AfterRender Handler="#{EditDocStore}.reload();" />
</Listeners>
<Tools>
<ext:Tool Type="Refresh" Handler="#{EditDocStore}.reload();" ToolTip="Refresh edit Doctors" />
</Tools>
<Items>
<ext:FormPanel runat="server" ID="FormPanel1" >
<Items>
<ext:Label ID="Label1" runat="server" Width="470" Height="40"></ext:Label>
<ext:TextField runat="server" ID="TextField1" FieldLabel="First Name" MaxLength="100" Width="470" Editable="true" Name="docFirstName" AllowBlank="false">
</ext:TextField>
</Items>
</ext:FormPanel>
</Items>
</ext:Window>
DocSearch.ascx.cs protected void EditDocStore_ReadData(object sender, StoreReadDataEventArgs e)
{
this.EditDocStore.Datasource = new object[]
{
new object[] { "DocName" }
};
this.EditDocStore.DataBind();
}
Last edited by fabricio.murta; Mar 17, 2017 at 3:36 PM.