Telerik Forums
UI for ASP.NET AJAX Forum
4 answers
276 views


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

sabarishbabu
Top achievements
Rank 1
 answered on 30 Jul 2009
2 answers
213 views
I have a GridButtonColumn and I'm wondering if it's possible to call a method in my C# code-behind.

I have this GridButtonColumn and I tried to set the OnDeleteCommand to call my method but it's not firing.
<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> 


Delete Method I wish to call:
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); 
        } 

Is it at all possible to get this method to run after the user confirms the delete message button?
Joe Tusing
Top achievements
Rank 1
 answered on 30 Jul 2009
10 answers
369 views
Hi,
I don't understand how to group my appointments. :(
For example:
If I have one appointment that occurs 10 times (recurrence), I want these 10 to render on the same row, horizontaly.
And next appointment (if exists) it will render below, and so on.
How do I make the group by?

My first thought was to group by RecurrenceParentID but that doesn't seems to work.
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; 
With this code the timeline is just blank! No appointments showing!


Peter
Telerik team
 answered on 30 Jul 2009
6 answers
176 views
I have a project that was developed somewhere else that I am trying to set up for development. I copied the entire source and am getting this error.

Server Error in '/' Application.

Parser Error

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Unknown server tag 'telerik:RadPanelBar'.

Source Error:

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>
it says it is an unknown server tag but as you can see it is registered right before the tag. Does anyone know what the problem is. Here is the ascx page the error is in. Line 4

<%@ 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> 
 


And here is the web.config file
<?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> 



Web Services
Top achievements
Rank 2
 answered on 30 Jul 2009
2 answers
218 views
Is this possible?  I've been trying to a few hours to figure it out, but can't find a way.
John
Top achievements
Rank 1
 answered on 30 Jul 2009
11 answers
307 views
I have setup a NestedViewTemplate in my RadGrid. The template contains an ASP.NET DetailsView control that is populated upon expanding a row. I also have set up exporting to Excel and PDF through two external buttons. Here are my exporting settings:

<ExportSettings FileName="PDFExport" IgnorePaging="true" OpenInNewWindow="true" ExportOnlyData="true"
        <Excel Format="ExcelML" /> 
        <Pdf PageTitle="Lookup Results" Subject="Lookup Results" /> 
</ExportSettings> 

Exporting through Excel works perfectly. However, when I export to PDF, the first column always shows. I have it setup so that upon exporting to PDF, to fix certain columns to the right width, and if the column's unique name is "ExpandColumn" or "RowIndicator", set width to 0 pixels, and make it invisible and not displayable.

Is there anything else I need to do to make the first expand column not display?
Pavlina
Telerik team
 answered on 30 Jul 2009
1 answer
97 views
Hi,
I hit on issue with deleting <object> tags in FF.
When I insert some video or flash using Manager I get html code like that:

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject" width="150" height="150"><param name="FileName" value="some_source"><embed src="some_source" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer" width="150" height="150"></object><br>

which is OK.
Problem occurs when I try to delete this object in FF in Design mode of RadEditor. It does not matter weather I try to delete the object by selecting it and hitting DEL or backspace. The result is that flash object disappears from design view but in HTML source is still some code left:

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" type="application/x-oleobject" width="150" height="150"><param name="FileName" value="some_source"></object><br>

RadEditor only erases <embed> tag but lefts <object> in HTML code. When I open page with html code like this in it in IE I can still see the empty window of the mediaplayer.

Is there any way to easy fix this problem?

Best regards,
Jakub Sterba
Cyber Stream Technology
Rumen
Telerik team
 answered on 30 Jul 2009
4 answers
230 views
I am trying to access certain attributes of an appointment from the client side "onAppointmentEditing" event.  I'm using eventArgs.get_appointment().get_attributes().getAttribute("Type") and it is returning "undefined".  I saw a similar post here:


I'm confused about why the attribute name "Type" wouldn't work.  While debugging my javascript method, I was able to see that the get_attributes() method only has 10 items in it when I actually have 15 custom attributes on my scheduler.  The following custom attributes were missing from the get_attributes()._keys list:

  • "Calendar"
  • "EventTypeID"
  • "Description"
  • "Location"
  • "Type"

All of these are listed in the "CustomAttributeNames" field of my scheduler control.  Are these reserved words in the scheduler control?  Why can't I access them from the client side?

Thank you,
Laura
Peter
Telerik team
 answered on 30 Jul 2009
2 answers
195 views
Hello

I would like to add some validators to the edit form that is generated automatically by the rad grid when you go into edit mode.

I have seen this help topic on the subject.
http://www.telerik.com/help/aspnet-ajax/grdvalidation.html

I do not want to add the validators programmatically. I would prefer to add them manually. I believe i can add them manually to the edit item template of a grid template column. However all of the columns in my grid are simple bound columns. Does this mean i have to convert all of my bound columns into template columns in order to add the validators? This is quite a lot of work. I was hoping it would be easier than this

thanks
andieje
Top achievements
Rank 1
 answered on 30 Jul 2009
3 answers
179 views
Hi,

   We are encountering a problem in using RadEditor. We deployed RadEditor for MOSS v. 4.5.2 and activated the feature for our blog sites. Unfortunately, on first load of the page that has the RadEditor, we are unable to do anything to it (e.g. type words on the editor, click any button, etc.). Although, after clicking on the HTML tab and going back to Design, we can already type on the editor. May I ask what the problem might be? So far, we can't find any work-around for this. Also, we thought a newer version might not have this problem but I am not sure where we can download it from. Your help would be very much appreciated. Thanks!

By the way, this issue is only happening in Firefox. The control works fine in IE.

Cheers,
Arthur
Stanimir
Telerik team
 answered on 30 Jul 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?