May 16, 2010, 5:52 AM
[CLOSED] Load RadioGroup Item from database on Combo Select event
Hi,
I mam trying to load the RadioGroup items from database on Combo Select event. The Select event gets fired and Radio Items are also added to the RadioGroup but I can't see these Item in the RadioGroup on the page.
I am using the following approach
Markup
Thanks
I mam trying to load the RadioGroup items from database on Combo Select event. The Select event gets fired and Radio Items are also added to the RadioGroup but I can't see these Item in the RadioGroup on the page.
I am using the following approach
Markup
<ext:ComboBox runat="server" ID="ddl" FieldLabel="Type" DisplayField="Name" ValueField="Id" DataIndex="Id">
</ext:ComboBox>
<ext:RadioGroup runat="server" ID="group" FieldLabel="Some Name" DataIndex="Id">
<Items>
<ext:Radio runat="server" ID="temp" Hidden="true">
</ext:Radio>
</Items>
</ext:RadioGroup>
Code Behindprotected override void OnLoad(System.EventArgs e)
{
ddl.DirectEvents.Select.Event += ddl_Event;
base.OnLoad(e);
}
void ddl_Event(object sender, Ext.Net.DirectEventArgs e)
{
this.group.Items.Clear();
//get records from database and add items to RadioGroup one by one
foreach (DataRow dataRow in dataView.Table.Rows)
{
this.group.Items.Add(new Radio { InputValue = dataRow["one"] + "", BoxLabel = dataRow["Two"] + "", Name = "SomeName",ID = "SomeId",GroupName = "groupName});
}
}
Looking for a quick response.Thanks