Can we configure multi-level context menu on a RadTreeeView to behave the following way:
if user clicks on the selected item, which leads to another sub-menu, this sub-menu becomes visible and stays this way (usually all menus disappear when the user takes cursor off them).
Thank you,
Irene Troupansky
User control with Radwindow wizard:
<%@ Control language="VB" AutoEventWireup="false" CodeFile="gallery.ascx.vb" Inherits="Gallery" %>
<%@ Reference VirtualPath="~/sites_admin/admin.master" %>
<!-- this buttons opens the popup -->
<
asp:Button
ID
=
"ButtonAddNew"
runat
=
"server"
CausesValidation
=
"false"
OnClick
=
"ButtonAddNew_Click"
/>
<
telerik:RadAjaxPanel
ID
=
"RadAjaxPanel1"
runat
=
"server"
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager01"
Modal
=
"true"
runat
=
"server"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"RadWindowImageEdit"
Skin
=
"kSitefinity"
AutoSize
=
"true"
EnableEmbeddedSkins
=
"false"
EnableEmbeddedBasestylesheet
=
"false"
Behaviors
=
"Close"
VisibleTitlebar
=
"true"
VisibleStatusbar
=
"false"
KeepInScreenBounds
=
"true"
EnableShadow
=
"false"
VisibleOnPageLoad
=
"False"
runat
=
"server"
>
<
ContentTemplate
>
<
div
style
=
"width: 900px; padding: 6px;"
>
<
asp:panel
id
=
"panel01"
runat
=
"server"
>
<!--Form part 1 content here -->
<
asp:button
id
=
"ButtonNext01"
ValidationGroup
=
"vgText"
CausesValidation
=
"True"
runat
=
"server"
OnClick
=
"OnClick_ButtonNext01"
/>
</
asp:panel
>
<
asp:panel
id
=
"panel02"
runat
=
"server"
>
<!--Form part 2 content here -->
<
asp:button
id
=
"Buttonback02"
ValidationGroup
=
"vgText"
CausesValidation
=
"True"
runat
=
"server"
OnClick
=
"OnClick_Buttonback02"
/>
</
asp:panel
>
</
div
>
</
ContentTemplate
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
</
telerik:RadAjaxPanel
>
CODE BEHIND:
'this pops up the window the first time ready to add a new item
Protected Sub ButtonAddNew_Click(ByVal sender As Object, ByVal e As EventArgs)
'some server side code here
'show the modal popup
RadWindowImageEdit.VisibleOnPageLoad = True
End Sub
'panel navigation
Protected Sub OnClick_ButtonNext01(ByVal sender As Object, ByVal e As EventArgs)
'some validation code here
panel02.Visible = True
panel01.Visible = False
End Sub
Protected Sub OnClick_Buttonback02(ByVal sender As Object, ByVal e As EventArgs)
'some validation code here
panel02.Visible = False
panel01.Visible = True
End Sub
<
telerik:RadGrid
ShowFooter
=
"True"
ID
=
"RadGrid1"
runat
=
"server"
AllowFilteringByColumn
=
"True"
AllowSorting
=
"True"
GridLines
=
"None"
ShowGroupPanel
=
"True"
Skin
=
"Web20"
PageSize
=
"15"
>
<
MasterTableView
ShowGroupFooter
=
"True"
GroupLoadMode
=
"Client"
CellSpacing
=
"-1"
></
MasterTableView
>
<
ClientSettings
AllowDragToGroup
=
"True"
></
ClientSettings
>
<
ExportSettings
OpenInNewWindow
=
"True"
ExportOnlyData
=
"True"
FileName
=
"DataExport"
></
ExportSettings
>
</
telerik:RadGrid
>
Protected
Sub
RadGrid1_ColumnCreated(
ByVal
sender
As
Object
,
ByVal
e
As
Telerik.Web.UI.GridColumnCreatedEventArgs)
Handles
RadGrid1.ColumnCreated
If
e.Column.DataType.Name =
"DateTime"
Then
CType
(e.Column, Telerik.Web.UI.GridBoundColumn).DataFormatString =
"{0:dd/MM/yyyy}"
End
If
If
e.Column.DataType.Name =
"Decimal"
Or
e.Column.DataType.Name =
"Double"
Then
CType
(e.Column, Telerik.Web.UI.GridBoundColumn).DataFormatString =
"{0:N3}"
CType
(e.Column, Telerik.Web.UI.GridBoundColumn).Aggregate = Telerik.Web.UI.GridAggregateFunction.Sum
End
If
If
e.Column.ColumnType =
"GridBoundColumn"
And
counteklendi =
False
Then
CType
(e.Column, Telerik.Web.UI.GridBoundColumn).Aggregate = Telerik.Web.UI.GridAggregateFunction.Count
CType
(e.Column, Telerik.Web.UI.GridBoundColumn).FooterText =
"Total : "
counteklendi =
True
End
If
End
Sub
PositionNumber ReportsTo
10030 10004
10122 10030
10838 10030
10923 10030
11015 10030
11015 10030
11229 10030
11422 10030
11453 10030
dear all
have a good day
i've a radschadualr in which students segister there schadual.
this schadual consists of substances each one is (leacture-tutorial-lab).
what i need is forcing the student to choose these sub categories (leacture-tutorial-lab) before leaving to choose new subject. and if he tries an error msg popup saying that "you should choose all substance groop- please complete your choice".
here is the code i wrote but it does't work.
 
if
(
this
.treeView.SelectedNode ==
null
)
return
;
if
(
this
.treeView.SelectedNode.Value !=
"m"
)
return
;
string
s =
this
.treeView.SelectedNode.Text;
string
corsnode =
this
.treeView.SelectedNode.ParentNode.Text;
string
cors_id = corsnode.Substring(0, corsnode.IndexOf(
'-'
) - 1).Trim();
string
stu_id = Session[
"test"
].ToString();
OracleConnection conn =
new
OracleConnection(ConfigurationManager.ConnectionStrings[
"ConnectionString"
].ConnectionString);
try
{
conn.Open();
OracleCommand cmd =
new
OracleCommand(
"COMPLETE_GROUP_TYPE"
);
cmd.CommandType =CommandType.StoredProcedure;
cmd.Connection = conn;
cmd.Parameters.Add(
"COURSEID"
, OracleType.Char).Value = cors_id.ToString();
cmd.Parameters.Add(
"STUDENTID"
, OracleType.Char).Value = stu_id.ToString();
cmd.ExecuteNonQuery();
}
catch
(Exception ex)
{
Label2.Text =
"ERROR."
+ ex.Message;
}
finally
{
conn.Close();
}
<telerik:RadCodeBlock ID="RadCodeBlockMain" runat="server"> |
<script type="text/javascript"> |
function OnClientTransferredHandler(sender, e) { |
var myitems; |
var radbox = $find('<%= CurrentlyTransferredValues.ClientId %>'); |
var radbox2 = $find('<%= SourceListBox.ClientId %>'); |
myitems = e.get_items(); |
myitems.forEach(function(item) { radbox.set_value(radbox.get_value() + item.get_value() + ","); }); |
radbox2.set_value(e.get_sourceListBox().get_id()); |
} |
</script> |
</telerik:RadCodeBlock> |