3 Answers, 1 is accepted
0
Accepted

Princy
Top achievements
Rank 2
answered on 15 Jun 2012, 06:53 AM
Hi Mohamed,
I suppose you want to access the CheckBox that is dynamically added in the RadPageView. Here is the full code that I tried based on your scenario.
ASPX:
C#:
Please elaborate your scenario if it doesn't helps.
Thanks,
Princy.
I suppose you want to access the CheckBox that is dynamically added in the RadPageView. Here is the full code that I tried based on your scenario.
ASPX:
<
telerik:RadTabStrip
ID
=
"RadTabStrip1"
runat
=
"server"
MultiPageID
=
"RadMultiPage1"
>
<
Tabs
>
<
telerik:RadTab
Text
=
"RadTab1"
PageViewID
=
"RadPageView1"
>
</
telerik:RadTab
>
</
Tabs
>
</
telerik:RadTabStrip
>
<
telerik:RadMultiPage
ID
=
"RadMultiPage1"
runat
=
"server"
>
<
telerik:RadPageView
ID
=
"RadPageView1"
runat
=
"server"
>
</
telerik:RadPageView
>
</
telerik:RadMultiPage
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
OnClick
=
"Button1_Click"
/>
C#:
protected
void
Page_Load(
object
sender, EventArgs e)
{
RadTab tab1 = RadTabStrip1.FindTabByText(
"RadTab1"
);
RadPageView PageView = tab1.PageView;
CheckBox chk =
new
CheckBox();
chk.ID =
"chk"
;
chk.Text =
"CheckBox"
;
PageView.Controls.Add(chk);
}
protected
void
Button1_Click(
object
sender, EventArgs e)
{
RadTab tab1 = RadTabStrip1.FindTabByText(
"RadTab1"
);
RadPageView PageView = tab1.PageView;
CheckBox chk =(CheckBox) PageView.FindControl(
"chk"
);
}
Please elaborate your scenario if it doesn't helps.
Thanks,
Princy.
0

mohamed
Top achievements
Rank 1
answered on 15 Jun 2012, 10:14 AM
Thanks For Ur Reply Princy ,
Pls Refer The Image ,
When I click the Add expression i Dynamic created Checkbox near that radfilter
I'm getting value from here from button click
Thanks Advance,
Mohamed.
Pls Refer The Image ,
When I click the Add expression i Dynamic created Checkbox near that radfilter
chk1 = (PlaceHolder)tab.FindControl("pHolder");
chk = (CheckBox)chk1.FindControl("ChkBox" + j.ToString());
I'm getting value from here from button click
Thanks Advance,
Mohamed.
0

Princy
Top achievements
Rank 2
answered on 18 Jun 2012, 04:47 AM
Hi Mohamed,
The dynamically created controls have to be created on each postback, otherwise they won't be persisted. Inorder to persist the controls you should create it in the Page_Init().
Hope this helps.
Thanks,
Princy.
The dynamically created controls have to be created on each postback, otherwise they won't be persisted. Inorder to persist the controls you should create it in the Page_Init().
Hope this helps.
Thanks,
Princy.