Oct 01, 2012, 7:04 PM
[CLOSED] Dynamic Formpanel Setvalues
Hi,
We have a requirement where dynamic formpanels will be build by a handler or service and in my mock up testing i found that the setvalues function is not setting the form values. Could you kindly point me in the correct direction?
default.aspx:
We have a requirement where dynamic formpanels will be build by a handler or service and in my mock up testing i found that the setvalues function is not setting the form values. Could you kindly point me in the correct direction?
default.aspx:
<body>
<form id="form1" runat="server">
<ext:ResourceManager ID="ResourceManager1" runat="server">
</ext:ResourceManager>
<ext:Viewport runat="server" Layout="border">
<Items>
<ext:Panel runat="server" Layout="Fit" Title="Center" Region="Center">
<Loader DirectMethod="#{DirectMethods}.LoadPanel" runat="server" Mode="Component">
<LoadMask ShowMask="true" />
</Loader>
</ext:Panel>
</Items>
</ext:Viewport>
</form>
</body>
default.aspx.cspublic partial class Default : System.Web.UI.Page
{
[DirectMethod]
public static string LoadPanel()
{
return ComponentLoader.ToConfig(GetFormPanel());
}
private static AbstractComponent GetFormPanel()
{
FormPanel form = new FormPanel() { ID = "FormPanel1", Title = "Tester" };
form.Items.Add(new TextField() { FieldLabel = "test label", ID = "testname", Name = "testname", Width = Unit.Pixel(250) });
form.SetValues(new { testname = "testing" });
return form;
}
}
Last edited by Daniil; Oct 02, 2012 at 9:21 AM.
Reason: [CLOSED]