hi guys,
please help me out!
I have a master page that contains a RadMenu:
on Masterpage.master:
01.<div id=
"menuDiv"
>
02. <telerik:RadMenu ID=
"RadMenu1"
runat=
"server"
BorderColor=
"black"
>
03. </telerik:RadMenu>
04.lt;/div>
on Masterpage.master.cs there are a banch of menuitems like this:
01.
protected
void
BuildDisplayMenu()
02.{
03. RadMenuItem item1_3 =
new
RadMenuItem();
04. item1_3.Text =
"Display"
;
05. item1_3.ToolTip =
"Display Setting"
;
06.
07. item1_3.NavigateUrl =
"~/traders/Preference/Display.aspx"
;
08. RadMenu1.Items.Add(item1_3);
09.}
Then,
I have a content page called Preference.aspx, which has an Radio functioning the show or hide
of the "Display" item clicked by clients:
01.<tr><td>Show Display:</td><td>
02.<asp:RadioButtonList ID=
"si_enable_Display"
runat=
"server"
RepeatLayout=
"Flow"
RepeatDirection=
"horizontal"
AutoPostBack=
"true"
>
03. <asp:ListItem Text=
"Yes"
Value=
"enable"
onclick=
"javascript:DisplayStat(value);"
></asp:ListItem>
04. <asp:ListItem Text=
"No"
Selected=
"true"
Value=
"disable"
onclick=
"javascript:DisplayStat(value);"
></asp:ListItem>
05.</asp:RadioButtonList></td></tr>
The DisplayStat() function I have tried this:
01.<script type=
"text/javascript"
language=
"javascript"
>
02. function DisplayStat(
object
)
03. {
04. var menuID = $find(
'<%=((RadMenu)Master.FindControl("RadMenu1")).ClientID %>'
);
05. var item = menuID.findItemByText(
"Display"
);
06.
if
(
object
==
"enable"
){
07. item.Enable();
08. }
09.
else
{
10. item.disable();
11. }
12. }
13.
14.</script>
var menuID = document.getElementById(
'<%=((RadMenu)Master.FindControl("RadMenu1")).ClientID %>'
);
And the problem still exists.
Please Help me out !!!thanks A lot!!!