<
telerik:RadMenu
ID
=
"RadMenuClients"
runat
=
"server"
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Toto"
Value
=
"0"
/>
<
telerik:RadMenuItem
Text
=
"Titi"
Value
=
"1"
/>
<
telerik:RadMenuItem
Text
=
"Tata"
Value
=
"3"
/>
<
telerik:RadMenuItem
Text
=
"Tutu"
Value
=
"2"
/>
<
telerik:RadMenuItem
Text
=
"Tete"
Value
=
"4"
/>
</
Items
>
</
telerik:RadMenu
>
Protected
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
Me
.Load
'Highliting
Dim
currentItem
As
RadMenuItem = RadMenuClients.Items.FindItemByValue(Session(
"idSel"
))
If
currentItem IsNot
Nothing
Then
currentItem.HighlightPath()
Else
RadMenuClients.Items.FindItemByValue(0).HighlightPath()
End
If
End
Sub
Protected
Sub
RadMenuClients_ItemClick(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.RadMenuEventArgs)
Handles
RadMenuClients.ItemClick
Session(
"idSel"
) = e.Item.Value
End
Sub
I have a RadMenu (with a custom skin - css code below) that has a root list with some of the root items having one level of child items. The issue that I have is that I have a border set to enclose the child items via a custom skin and it partially displays when you hover a root item that has no child items assigned to it (See attached images - NoChildItems.jpg and ChildItems.jpg). I changed the border color to red so that it would stand out during testing. Is there any way to rectify this or does the border have to be the same color as the root item background?
/* SVPD Menu / Simple> */
/* for root items */
div.RadMenu_SVPD ul.rmRootGroup
{
}
div.RadMenu_SVPD .rmLink
{
color
:
#ffffff
;
padding-left
:
15px
;
font-family
:
Arial
,
Helvetica
,
sans-serif
;
font-size
:
12px
;
font-weight
:
normal
;
text-decoration
:
none
;
height
:
20px
;
}
/* for hover, focused, expanded items */
div.RadMenu_SVPD .rmItem .rmLink:hover
{
color
:
#91c8ff
;
cursor
:
pointer
;
}
div.RadMenu_SVPD .rmItem .rmFocused,
div.RadMenu_SVPD .rmItem .rmSelected,
div.RadMenu_SVPD .rmItem .rmExpanded
{
}
/*for subitems */
div.RadMenu_SVPD .rmGroup
{
padding-top
:
4px
!important
;
border
:
1px
solid
#ff0000
;
background
:
#003c77
url
(
'Menu/rmVSprite.png'
)
repeat-y
;
}
div.RadMenu_SVPD .rmGroup .rmLink
{
color
:
#ffffff
;
padding-right
:
0px
!important
;
font-family
:
Arial
,
Helvetica
,
sans-serif
;
font-size
:
12px
;
font-weight
:
normal
;
text-decoration
:
none
;
float
:
left
;
}
div.RadMenu_SVPD .rmGroup .rmText
{
Padding-
left
:
10px
!important
;
}
/* for hover, focused, expanded items */
div.RadMenu_SVPD .rmGroup .rmItem .rmLink:hover
{
color
:
#91c8ff
;
cursor
:
pointer
;
}
div.RadMenu_SVPD .rmGroup .rmItem .rmFocused,
div.RadMenu_SVPD .rmGroup .rmItem .rmSelected,
div.RadMenu_SVPD .rmGroup .rmItem .rmExpanded
{
}
I have some ajax stuff on the page- fill one dropdown based on another dropdown's selection.
I also used Radcaptcha, when submit the page, the page alway not valid, unless putting the radcaptcha inside the UpdatePanel .
<asp:UpdatePanel ID="UpdatePanel7" runat="server">
<ContentTemplate>
<telerik:RadCaptcha ID="RadCaptcha1" Runat="server" ValidationGroup="Group"
ErrorMessage="Page not valid. The code you entered is not valid.Page not valid. The code you entered is not valid"
ImageStorageLocation="Session">
</telerik:RadCaptcha>
</ContentTemplate>
</asp:UpdatePanel>
This will solve page not valid problem, but everytime when the ajax fired (first dropdown is selected), the Radcaptcha's text got changed. Is there anyway that can prevent the Radcaptcha text changing everytime when the ajax fired?
Thanks
Hi,
I have created a RadGrid with self-referencing hierarchy without a problem. But as we are having some performance issues I don't have the luxure to send/receive big page sizes each time. So I send the grid empty without binding the data on needDataSource event. Then I get the data with ajax in json format which is quite small. The problem is I cannot find a client side event, which formats the data with the given hierarchical structure. Is there a way for that or do I need to write a custom javascript function to create that structure?
Where should I assign the filter expression on client side, which I do on server side like t.MasterTableView.FilterExpression = @"it[""PARENT""] = Convert.DBNull";
Given code creates the grid and binds the data but without a structure.
Thanks in advance,
Cem
<
telerik:RadGrid
ID
=
"t"
runat
=
"server"
AutoGenerateColumns
=
"false"
AllowPaging
=
"True"
HierarchyDefaultExpanded
=
"false"
HierarchyLoadMode
=
"Client"
AllowSorting
=
"True"
PageSize
=
"10"
>
<
mastertableview
datakeynames
=
"CHILD,PARENT"
>
<
SelfHierarchySettings
ParentKeyName
=
"PARENT"
KeyName
=
"CHILD"
/>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"CHILD"
HeaderText
=
"CHILD"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"PARENT"
HeaderText
=
"PARENT"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"AMOUNT"
HeaderText
=
"AMOUNT"
>
</
telerik:GridBoundColumn
>
</
Columns
>
</
mastertableview
>
<
clientsettings
allowexpandcollapse
=
"true"
selecting-allowrowselect
=
"true"
enablerowhoverstyle
=
"false"
>
<
Scrolling
AllowScroll
=
"True"
ScrollHeight
=
"400px"
UseStaticHeaders
=
"True"
/>
</
clientsettings
>
</
telerik:RadGrid
>
Sys.Application.add_init(
function
() {
var
grid = $find(
"<%=t.ClientID%>"
);
var
tableView = grid.get_masterTableView();
var
id = grid.get_element().id;
var
objData = {
id: id,
startIndex: tableView.get_currentPageIndex(),
pageSize: tableView.get_pageSize(),
};
$.ajax({
type:
"POST"
,
url: url,
data: Sys.Serialization.JavaScriptSerializer.serialize({ data: objData }),
contentType:
"application/json; charset=utf-8"
,
success:
function
(arg) {
//create an array with coming data and assign it
tableView.set_dataSource(arr);
tableView.dataBind();
},
before:
function
() {
},
error:
function
() {
}
});
<span id="RadDock1_C_val1_wrapper" class="RadInput RadInput_Default" style="white-space:nowrap;"> <input type="text" size="20" id="RadDock1_C_val1_text" name="RadDock1_C_val1_text" class="riTextBox riEnabled" style="width:125px;" /> <input id="RadDock1_C_val1" name="RadDock1$C$val1" class="rdfd_" style="visibility:hidden;margin:-18px 0 0 -1px;width:1px;height:1px;overflow:hidden;border:0;padding:0;" type="text" value="" /> <input id="RadDock1_C_val1_ClientState" name="RadDock1_C_val1_ClientState" type="hidden" /></span>And my javascript code - var test = $find("<%=RadDock1.ContentContainer.FindControl("val1").ClientID %>");