<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
asp:ScriptManager
ID
=
"ScriptManager1"
runat
=
"server"
/>
<
telerik:RadEditor
ID
=
"reEdytor"
runat
=
"server"
EditModes
=
"All"
ContentFilters
=
"MakeUrlsAbsolute"
Width
=
"100%"
Height
=
"93%"
AutoResizeHeight
=
"false"
EnableResize
=
"false"
ToolsFile
=
"~/Config/radeditor.xml"
>
</
telerik:RadEditor
>
<
telerik:RadScriptBlock
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
Telerik.Web.UI.Editor.CommandList["FileEdit"] = function(commandName, editor, args) {
editor.set_mode(1);
setTimeout(function() {
editor.setFocus();
}, 10);
}
</
script
>
</
telerik:RadScriptBlock
>
</
div
>
</
form
>
</
body
>
</
html
>
Config/radeditor.xml
<
root
>
<
modules
>
<
module
name
=
"RadEditorStatistics"
dockingZone
=
"Bottom"
enabled
=
"true"
visible
=
"true"
dockable
=
"true"
/>
<
module
name
=
"RadEditorDomInspector"
dockingZone
=
"Module"
enabled
=
"true"
visible
=
"true"
dockable
=
"true"
/>
<
module
name
=
"RadEditorNodeInspector"
dockingZone
=
"Module"
enabled
=
"true"
visible
=
"true"
dockable
=
"true"
/>
<
module
name
=
"RadEditorDiagnostics"
dockingZone
=
"Module"
enabled
=
"true"
visible
=
"true"
dockable
=
"true"
/>
<
module
name
=
"RadEditorHtmlInspector"
dockingZone
=
"Module"
enabled
=
"true"
visible
=
"false"
dockable
=
"true"
/>
</
modules
>
<
tools
enabled
=
"true"
>
<
tool
name
=
"FileEdit"
/>
</
tools
>
<
links
>
</
links
>
<
snippets
>
</
snippets
>
<
symbols
>
</
symbols
>
<
fontNames
>
</
fontNames
>
<
fontSizes
>
</
fontSizes
>
<
colors
>
</
colors
>
<
classes
>
</
classes
>
<
paragraphs
>
</
paragraphs
>
<
dialogParameters
>
</
dialogParameters
>
<
languages
>
</
languages
>
</
root
>
<
telerik:RadGrid
ID
=
"grdHistory"
runat
=
"server"
OnItemCreated
=
"grdHistory_ItemCreated"
OnItemDataBound
=
"grdHistory_ItemDataBound"
OnNeedDataSource
=
"grdHistory_NeedDataSource"
OnPreRender
=
"grdHistory_PreRender"
OnSortCommand
=
"grdHistory_SortCommand"
OnPageSizeChanged
=
"grdHistory_SaveSettingsOnClose"
AutoGenerateColumns
=
"true"
SkinID
=
"worklist"
AllowCustomPaging
=
"true"
AllowPaging
=
"true"
AllowFilteringByColumn
=
"false"
Width
=
"99%"
>
<
HeaderContextMenu
OnClientItemClicking
=
"GridHeaderContextMenuOnClientItemClicking"
>
</
HeaderContextMenu
>
<
ClientSettings
ColumnsReorderMethod
=
"Reorder"
EnablePostBackOnRowClick
=
"false"
ReorderColumnsOnClient
=
"False"
AllowColumnsReorder
=
"True"
AllowKeyboardNavigation
=
"True"
>
<
Scrolling
AllowScroll
=
"true"
SaveScrollPosition
=
"true"
UseStaticHeaders
=
"true"
/>
<
Resizing
ResizeGridOnColumnResize
=
"false"
AllowColumnResize
=
"true"
EnableRealTimeResize
=
"false"
AllowResizeToFit
=
"true"
/>
<
ClientEvents
OnColumnShown
=
"SaveSettingsOnClose"
OnColumnHidden
=
"SaveSettingsOnClose"
OnColumnResized
=
"SaveSettingsOnClose"
OnColumnClick
=
"SaveSettingsOnClose"
OnColumnSwapped
=
"SaveSettingsOnClose"
OnColumnMovingToLeft
=
"SaveSettingsOnClose"
OnColumnMovingToRight
=
"SaveSettingsOnClose"
OnColumnMovedToLeft
=
"SaveSettingsOnClose"
OnColumnMovedToRight
=
"SaveSettingsOnClose"
OnMasterTableViewCreated
=
"MasterTableViewCreated"
OnKeyPress
=
"preventInlineEditing"
/>
</
ClientSettings
>
<
MasterTableView
commanditemdisplay
=
"None"
enablecolumnsviewstate
=
"false"
AllowPaging
=
"True"
AllowSorting
=
"True"
Width
=
"100%"
>
<
HeaderStyle
Width
=
"200px"
/>
<
RowIndicatorColumn
Visible
=
"False"
>
</
RowIndicatorColumn
>
</
MasterTableView
>
</
telerik:RadGrid
>
function SaveSettingsOnClose(sender, eventArgs) {
triggerIsPostBack = true;
document.getElementById('<%=hSaveSettingsOnClose.ClientID %>').value = "1";
}
protected
void
grdHistory_SortCommand(
object
sender, GridSortCommandEventArgs e)
{
StoreLastSort();
}
private
void
StoreLastSort()
{
if
(grdHistory.MasterTableView.SortExpressions.Count > 0)
{
//Store the column sorted on for when we reload
foreach
(GridSortExpression gse
in
grdHistory.MasterTableView.SortExpressions)
{
string
direction = (gse.SortOrder == GridSortOrder.Ascending) ?
"ASC"
:
"DESC"
;
UserSettingHelper.SetUserSetting(SortSettingKey, gse.FieldName +
","
+ direction);
}
}
else
{
UserSettingHelper.DeleteUserSetting(SortSettingKey);
}
}
I would like to disable my menu item based on the Active directory login.
I am using SQL data source, My ASPX page and Menu control look like this
<telerik:RadMenu ID="RadMenu1" Runat="server" DataFieldID="ID"
DataFieldParentID="Parent" DataNavigateUrlField="Url"
DataSourceID="SqlDataSource1" DataTextField="Title" Skin="Glow"
EnableRoundedCorners="true" style="z-index: 100000; left: 0px; top: 52px; position: absolute">
<DefaultGroupSettings ExpandDirection="Down" RepeatDirection="Horizontal" />
</telerik:RadMenu>
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:PROJECT_STATUS %>"
SelectCommand="PRS_GetWebSiteSiteMap" SelectCommandType="StoredProcedure">
</asp:SqlDataSource>
I have another table which tell me the user login ID and pageID he has access to. So What I want based on the User login I would like to enable the menu pages.
So User Chris with domain\Chris only access to page 1,3,5. The menu control of page 1,3,5 are enabled and remaining all the of the menu control will be disabled.
I hope someone will be able to help me out
Thanks
Syed
<
telerik:RadScheduler
runat
=
"server"
ID
=
"rsTicketsSchedule"
OnResourcesPopulating
=
"rsTicketsSchedule_ResourcesPopulating"
SelectedView
=
"TimelineView"
OnTimeSlotCreated
=
"rsTicketsSchedule_TimeSlotCreated"
OnClientAppointmentsPopulated
=
"OnClientAppointmentsPopulated"
OnClientAppointmentsPopulating
=
"OnClientAppointmentsPopulating"
OnClientResourcesPopulating
=
"OnClientResourcesPopulating"
AppointmentStyleMode
=
"Default"
OnClientAppointmentClick
=
"singleClick"
OnClientAppointmentCreated
=
"OnAppointmentCreated"
OnClientAppointmentDoubleClick
=
"rsClientAppointmentDoubleClick"
OnClientAppointmentMoveEnd
=
"AppointmentMoved"
OnClientAppointmentResizeStart
=
"OnAppointmentResizeStart"
OnClientAppointmentResizeEnd
=
"OnAppointmentResizeEnd"
OnClientAppointmentWebServiceDeleting
=
"OnAppointmentDeleting"
OnClientAppointmentWebServiceUpdating
=
"OnAppointmentUpdating"
OnClientRequestSuccess
=
"OnClientRequestSuccess"
OnClientRequestFailed
=
"OnClientRequestFailed"
OnClientAppointmentMoveStart
=
"StopTimer"
OnClientAppointmentDataBound
=
"OnClientAppointmentDataBound"
OnClientDataBound
=
"onSchedulerDataBound"
AllowInsert
=
"False"
DisplayDeleteConfirmation
=
"True"
Localization-HeaderToday
=
"Today"
EnableCustomAttributeEditing
=
"True"
EnableDescriptionField
=
"True"
Height
=
"100%"
EnableExactTimeRendering
=
"true"
EnableViewState
=
"true"
OverflowBehavior
=
"Scroll"
ShowAllDayRow
=
"false"
OnClientAppointmentContextMenu
=
"OnClientAppointmentContextMenu"
OnClientAppointmentContextMenuItemClicked
=
"handleClick"
OnClientNavigationComplete
=
"OnClientNavigationComplete"
OnClientNavigationCommand
=
"OnClientNavigationCommand"
>
<
DayView
UserSelectable
=
"True"
GroupBy
=
"TechName"
GroupingDirection
=
"Horizontal"
/>
<
WeekView
UserSelectable
=
"True"
GroupBy
=
"TechName"
GroupingDirection
=
"Vertical"
/>
<
MonthView
UserSelectable
=
"True"
GroupBy
=
"TechName"
GroupingDirection
=
"Vertical"
/>
<
TimelineView
GroupBy
=
"TechName"
ColumnHeaderDateFormat
=
"h:mm tt"
GroupingDirection
=
"Vertical"
HeaderDateFormat
=
"MM/dd/yyyy h:mm tt"
NumberOfSlots
=
"21"
SlotDuration
=
"00:30:00"
StartTime
=
"08:00:00"
/>
<
WebServiceSettings
Path
=
"WorkforceServices/M4SchedulerWebService.asmx"
ResourcePopulationMode
=
"ServerSide"
/>
<
AppointmentContextMenus
>
<
telerik:RadSchedulerContextMenu
ID
=
"RsTicketsScheduleContextMenu"
runat
=
"server"
> </
telerik:RadSchedulerContextMenu
>
</
AppointmentContextMenus
>
<
ResourceTypes
>
<
telerik:ResourceType
Name
=
"TechName"
/>
<
telerik:ResourceType
Name
=
"TicketState"
/>
</
ResourceTypes
>
</
telerik:RadScheduler
>
OnClientAppointmentClick
=
"singleClick"
function singleClick(sender, eventArgs) {
var apptID1 = eventArgs.get_appointment().get_id();
apptIDInfo = "ShowRadTabStrip|" + apptID1 + "|ApptID";
__doPostBack("TestPanel1UpdBtn", apptIDInfo); //Causes Postback to show RadTabstrip for TicketInfo
return false;
}