I am using RadPanelBar with in Radgrid in
EditMode
="EditForms"
Like this
<EditFormSettings EditFormType ="Template" >
<PopUpSettings ScrollBars="None" />
<FormTemplate >
<telerik:RadPanelBar ID="redPanalBar1" runat="server" OnItemClick ="redPanalBar1_ItemClick" OnLoad ="redPanalBar1_Load">
</telerik:RadPanelBar>
</FormTemplate>
</EditFormSettings>
and on serverside
i fired both the events of redpanelbar which are OnLoad and OnItemClick
Like this
protected void redPanalBar1_Load(object sender, EventArgs e)
{
RadPanelBar rdinpan = (sender as RadPanelBar);
if ((ViewState["SelectedValue"] != "") && (ViewState["SelectedValue"] != null))
{
if (rdinpan != null)
{
if (rdinpan.SelectedItem != null)
{
rdinpan.Items[rdinpan.SelectedItem.Index].Controls.Add(Page.LoadControl(
"UserControls/Abc.ascx"));
}
}
}
}
protected void redPanalBar1_ItemClick(object sender, RadPanelBarEventArgs e)
{
RadPanelBar rdinpan = (sender as RadPanelBar);
Session[
"test] = e.Item.Value;
foreach (RadPanelItem item in rdinpan.Items)
{
item.Expanded =
true;
if (e.Item.Value == item.Value)
{
rdinpan.Items[rdinpan.SelectedItem.Index].Controls.Clear();
rdinpan.Items[rdinpan.SelectedItem.Index].Controls.Add(Page.LoadControl(
"UserControls/Abc.ascx"));
rdinpan.Items[rdinpan.SelectedItem.Index].Expanded =
true;
rdinpan.ExpandMode =
PanelBarExpandMode.MultipleExpandedItems;
break;
}
else
{
rdinpan.ExpandMode =
PanelBarExpandMode.MultipleExpandedItems;
}
}
after doing all this i m facing some kind of problem like if i putted the debugger on the itemcommand event of radgrid it works fine with taking this debugger
but if i donot put debugger on the itemcommand and i click addnewrecor link button of the radgrid the application becomes hangs and same thing is happened with the edit button
i also cheked that there is no problem with taking the taxtboxes with in edit template if i removed the redpanelbar.
pls suggest me the soln of the problem..