May 23, 2013, 12:24 PM
Problem with RadioGroup Events...
http://forums.ext.net/showthread.php...791#post109791
am binding the RadioGroup based above link...
am binding the RadioGroup based above link...
<ext:FormPanel runat="server" ID="formpanel1">
<Items>
<ext:RadioGroup ID="RadioGroupBody" runat="server" FieldLabel="Body" LabelWidth="150"
Width="400" ColumnsNumber="3">
<DirectEvents>
<Change OnEvent="RadioGroup_Change" />
</DirectEvents>
</ext:RadioGroup>
</Items>
</ext:FormPanel>
this is the way am binding... RadioGroupBody.Items.Add(new Radio
{
ID = "Text",
IDMode = IDMode.Explicit,
BoxLabel = "Text",
InputValue = "Text",
Checked = ResouceContentFormat == "Text" ? true : false
});
RadioGroupBody.Items.Add(new Radio
{
ID = "Url",
IDMode = IDMode.Explicit,
BoxLabel = "URL",
InputValue = "Url",
Checked = ResouceContentFormat == "Url" ? true : false
});
RadioGroupBody.Items.Add(new Radio
{
ID = "File",
IDMode = IDMode.Explicit,
BoxLabel = "Upload",
InputValue = "File",
Checked = ResouceContentFormat == "File" ? true : false
});
RadioGroupBody.AddTo(formpanel1);
the error will appearing Here...protected void RadioGroup_Change(object sender, DirectEventArgs e)
{
RadioGroup rg = sender as RadioGroup;
RadioGroupBody.Items.Count();
X.Msg.Alert("Change", rg.CheckedItems[0].ID).Show();
}
the Error message is
Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
Parameter name: index