or
Subject: How can I call the server code from RadContextMenu Item Selecting?
1. I have list of appointments populated in the Scheduler which binds from the database in page load event.
2. I need the following
a) Right click on the appointments.
b) Show the context menu.
c) click an item from context menu , how can I call the codebehind function (RadScheduler1_AppointmentUpdate or SchedulerContextMenu_ItemClick)?. How can I get the selected appointmentsvalue like (Subject Id, Start/End Date)?
Note:
1. Create a context menu item as “Waitinglist”.
2. Select the “Waiting list” from the menu.
3. Update selected appointments in the Database.
Thanks and Regards
Sabarish
| <telerik:GridButtonColumn UniqueName="DeleteColumn" ConfirmText="Delete this Group?" ConfirmDialogType="RadWindow" |
| ConfirmTitle="Delete" ButtonType="ImageButton" Text="Delete" ItemStyle-HorizontalAlign="Right" |
| ItemStyle-Width="10px" CommandName="Delete"></telerik:GridButtonColumn> |
| protected void rgAuthGroups_Delete(object source, Telerik.Web.UI.GridCommandEventArgs e) |
| { |
| GridDataItem item = (GridDataItem)e.Item; |
| int groupID = Convert.ToInt32(item["idColumn"].Text); |
| GroupFactory.DeleteGroup(groupID); |
| } |
| RadScheduler1.DataSource = TaskBL.GetTasks(); |
| RadScheduler1.DataKeyField = "Id"; |
| RadScheduler1.DataSubjectField = "Name"; |
| RadScheduler1.DataStartField = "StartDate"; |
| RadScheduler1.DataEndField = "EndDate"; |
| RadScheduler1.DataRecurrenceField = "RecurrenceRule"; |
| RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentId"; |
| RadScheduler1.GroupBy = "RecurrenceParentId"; |
| RadScheduler1.GroupingDirection = GroupingDirection.Vertical; |
Line 2: Inherits="WebControls_UserLeftMenu" %>
Line 3: <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
Line 4: <telerik:RadPanelBar Width="169px" ID="RadPanelBar1" runat="server" ExpandMode="SingleExpandedItem"
Line 5: Skin="Web20" >
Line 6: <Items>
|
| <%@ Control Language="VB" AutoEventWireup="false" CodeFile="UserLeftMenu.ascx.vb" | |
| Inherits="WebControls_UserLeftMenu" %> | |
| <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> | |
| <telerik:RadPanelBar Width="169px" ID="RadPanelBar1" runat="server" ExpandMode="SingleExpandedItem" | |
| Skin="Web20" > | |
| <Items> | |
| <telerik:RadPanelItem runat="server" Text="BMI Information" PostBack="false" Expanded="true" CssClass="leftmenucss" > | |
| <Items> | |
| <telerik:RadPanelItem runat="server" Value="districts" Text=" " ImageUrl="~/App_Themes/Default/Images/Districts.jpg" | |
| SelectedImageUrl="~/App_Themes/Default/Images/Districts.jpg"> | |
| </telerik:RadPanelItem> | |
| <telerik:RadPanelItem runat="server" Value="schools" Text=" " ImageUrl="~/App_Themes/Default/Images/Schools.jpg"> | |
| </telerik:RadPanelItem> | |
| <telerik:RadPanelItem runat="server" Value="classses" Text=" " ImageUrl="~/App_Themes/Default/Images/Classes.jpg"> | |
| </telerik:RadPanelItem> | |
| <telerik:RadPanelItem runat="server" Value="students" Text=" " ImageUrl="~/App_Themes/Default/Images/Students.jpg"> | |
| </telerik:RadPanelItem> | |
| </Items> | |
| </telerik:RadPanelItem> | |
| <telerik:RadPanelItem runat="server" Text="Reporting" PostBack="false" CssClass="leftmenucss" > | |
| <Items> | |
| <telerik:RadPanelItem runat="server" Value="reporting" Text=" " ImageUrl="~/App_Themes/Default/Images/Reports.jpg"> | |
| </telerik:RadPanelItem> | |
| </Items> | |
| </telerik:RadPanelItem> | |
| <telerik:RadPanelItem runat="server" Text="Administration" Value="administration" PostBack="false" CssClass="leftmenucss" > | |
| <Items> | |
| <telerik:RadPanelItem runat="server" Value="users" Text=" " ImageUrl="~/App_Themes/Default/Images/Users.jpg"> | |
| </telerik:RadPanelItem> | |
| </Items> | |
| </telerik:RadPanelItem> | |
| </Items> | |
| </telerik:RadPanelBar> | |
| <?xml version="1.0"?> | |
| <!-- | |
| Note: As an alternative to hand editing this file you can use the | |
| web admin tool to configure settings for your application. Use | |
| the Website->Asp.Net Configuration option in Visual Studio. | |
| A full list of settings and comments can be found in | |
| machine.config.comments usually located in | |
| \Windows\Microsoft.Net\Framework\v2.x\Config | |
| --> | |
| <configuration> | |
| <configSections> | |
| <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> | |
| <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> | |
| <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> | |
| <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"> | |
| <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" /> | |
| <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> | |
| <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> | |
| <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" /> | |
| </sectionGroup> | |
| </sectionGroup> | |
| </sectionGroup> | |
| </configSections> | |
| <appSettings /> | |
| <connectionStrings> | |
| <add name="DBConnection" connectionString="server=serverInfo;" providerName="System.Data.SqlClient" /> | |
| </connectionStrings> | |
| <system.web> | |
| <!-- | |
| Set compilation debug="true" to insert debugging | |
| symbols into the compiled page. Because this | |
| affects performance, set this value to true only | |
| during development. | |
| --> | |
| <membership defaultProvider="SqlMembershipProvider"> | |
| <providers> | |
| <clear/> | |
| <add name="SqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" | |
| connectionStringName="DBConnection" applicationName="/BMI" | |
| minRequiredPasswordLength="5" minRequiredNonalphanumericCharacters="0" /> | |
| </providers> | |
| </membership> | |
| <roleManager enabled="true"> | |
| <providers> | |
| <clear/> | |
| <add name="AspNetSqlRoleProvider" connectionStringName="DBConnection" applicationName="/BMI" type="System.Web.Security.SqlRoleProvider" /> | |
| </providers> | |
| </roleManager> | |
| <compilation debug="true"> | |
| <assemblies> | |
| <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> | |
| <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
| <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> | |
| <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /> | |
| </assemblies> | |
| </compilation> | |
| <!-- | |
| The <authentication> section enables configuration | |
| of the security authentication mode used by | |
| ASP.NET to identify an incoming user. | |
| --> | |
| <authentication mode="Forms"> | |
| <forms name=".BMI" loginUrl="Login.aspx" cookieless="UseCookies" /> | |
| </authentication> | |
| <authorization> | |
| <deny users="?" /> | |
| </authorization> | |
| <!-- | |
| The <customErrors> section enables configuration | |
| of what to do if/when an unhandled error occurs | |
| during the execution of a request. Specifically, | |
| it enables developers to configure html error pages | |
| to be displayed in place of a error stack trace. | |
| <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm"> | |
| <error statusCode="403" redirect="NoAccess.htm" /> | |
| <error statusCode="404" redirect="FileNotFound.htm" /> | |
| </customErrors> | |
| --> | |
| <pages> | |
| <controls> | |
| <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
| <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
| </controls> | |
| </pages> | |
| <httpHandlers> | |
| <remove verb="*" path="*.asmx" /> | |
| <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
| <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
| <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" /> | |
| <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" /> | |
| </httpHandlers> | |
| <httpModules> | |
| <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
| </httpModules> | |
| </system.web> | |
| <system.codedom> | |
| <compilers> | |
| <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |
| <providerOption name="CompilerVersion" value="v3.5" /> | |
| <providerOption name="WarnAsError" value="false" /> | |
| </compiler> | |
| <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> | |
| <providerOption name="CompilerVersion" value="v3.5" /> | |
| <providerOption name="OptionInfer" value="true" /> | |
| <providerOption name="WarnAsError" value="false" /> | |
| </compiler> | |
| </compilers> | |
| </system.codedom> | |
| <!-- | |
| The system.webServer section is required for running ASP.NET AJAX under Internet | |
| Information Services 7.0. It is not necessary for previous version of IIS. | |
| --> | |
| <system.webServer> | |
| <validation validateIntegratedModeConfiguration="false" /> | |
| <modules> | |
| <remove name="ScriptModule" /> | |
| <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
| </modules> | |
| <handlers> | |
| <remove name="WebServiceHandlerFactory-Integrated" /> | |
| <remove name="ScriptHandlerFactory" /> | |
| <remove name="ScriptHandlerFactoryAppServices" /> | |
| <remove name="ScriptResource" /> | |
| <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
| <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
| <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" /> | |
| <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" /> | |
| </handlers> | |
| </system.webServer> | |
| <runtime> | |
| <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> | |
| <dependentAssembly> | |
| <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35" /> | |
| <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> | |
| </dependentAssembly> | |
| <dependentAssembly> | |
| <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35" /> | |
| <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0" /> | |
| </dependentAssembly> | |
| </assemblyBinding> | |
| </runtime> | |
| <location path="Index.aspx"> | |
| <system.web> | |
| <authorization> | |
| <allow users="*" /> | |
| </authorization> | |
| </system.web> | |
| </location> | |
| <location path="Forgotpassword.aspx"> | |
| <system.web> | |
| <authorization> | |
| <allow users="*" /> | |
| </authorization> | |
| </system.web> | |
| </location> | |
| <location path="User.aspx"> | |
| <system.web> | |
| <authorization> | |
| <allow users="*" /> | |
| </authorization> | |
| </system.web> | |
| </location> | |
| <location path="class.aspx"> | |
| <system.web> | |
| <authorization> | |
| <allow users="*" /> | |
| </authorization> | |
| </system.web> | |
| </location> | |
| <location path="App_Themes"> | |
| <system.web> | |
| <authorization> | |
| <allow users="*" /> | |
| </authorization> | |
| </system.web> | |
| </location> | |
| <system.net> | |
| <mailSettings> | |
| <smtp from="noreply@semaphore-software.com"> | |
| <network host="networkInfo" /> | |
| </smtp> | |
| </mailSettings> | |
| </system.net> | |
| </configuration> |
| <ExportSettings FileName="PDFExport" IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true"> |
| <Excel Format="ExcelML" /> |
| <Pdf PageTitle="Lookup Results" Subject="Lookup Results" /> |
| </ExportSettings> |
