This is a migrated thread and some comments may be shown as answers.

[Solved] radpanel bar with in editform template of radgrid

1 Answer 135 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
bankey
Top achievements
Rank 1
bankey asked on 26 May 2008, 02:51 PM
Hi,

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..

1 Answer, 1 is accepted

Sort by
0
bankey
Top achievements
Rank 1
answered on 27 May 2008, 02:43 PM
actually from all the codes i want to know how to use radpanelbar inside  radgrid in Edit form template.
Tags
PanelBar
Asked by
bankey
Top achievements
Rank 1
Answers by
bankey
Top achievements
Rank 1
Share this question
or