Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
188 views
I am getting the below error when I am loading data from WCF service onDemand.

Microsoft JScript runtime error: 'length' is null or not an object

Any help is appreciated. I beleive it has to do with AJAX.

Thanks

Telerikuser
Top achievements
Rank 1
 asked on 30 Jul 2009
5 answers
249 views

Hello,
 Im finding myself in a dead-end can't understand the issue origin. I explain gradually and post my code blocks if you ask me to.
Using RadScheduler and a new Advanced Form edit template in it for inserting and editing of my appointments, following exactly the pattern as your demo shows (LINK).

My Resources are 3:
- Services    (let's say its the Room from your example)  presented as ResourceControl.ascx (RadComboBox with entries)
- Operators (it's Alex, bob, charly that are able to solve services) as ResourceControl.ascx (another RadComboBox)
- Users ( Only Radscheduler has this one, i don't put this one into AdvancedForm.ascx) i only need this on Session level (login etc)

Mainly it's the Services-Operator couples that defines appointments.

Before describe My issue: i have DayView grouped by Services (like rooms in your case) and once inserted the appointment the drag-n-drop edit is only possible for start/end (vertical only) you can't drag it on another service.

so all i do is controll on Appointment_Update event

        if ((e.Appointment.Resources.GetResourceByType("Service") as Resource).Key.ToString() != (e.ModifiedAppointment.Resources.GetResourceByType("Service") as Resource).Key.ToString() ) 
            e.Cancel = true; 

this works perfectly.
If i control the resources there're 3 on Appointment and 3 on ModifiedAppointment (Service,Operator and User respectively).
Notice doing so the AdvancedForm is of course not shown

But once the thing Goes on AdvancedForm the resources are LOST !

example: I open already inserted appointment and modify let's say Subject and click Update, if i debug the AdvancedForm.ascx.cs (i put the Update_Button_Click Event to control some things) during that, i see the Appointment object (passed from scheduler to here has it's resources and there're all 3 of them during Update_button_click. After that it goes till MainPage.aspx where scheduler is, and of course till Appointment_Update event. When it goes to IF sentence i wrote before the NullReference happens :

ModifiedAppointment.Resources.GetResourceByType("Service") = null     !!!

if i debug this , i see the original Appointment still has 3 resources (Service, Operator, User)
BUT then modifiedAppointment has ONLY 1 (User)

It's as the Binding inside AdvancedForm the Two of my resources (Service and Operator) they're being sucked away by AdvancedForm or being forgot to add inside ModifiedApointment or else ... 

i debugged deeply inside all events of AdvancedForm.ascx.cs and haven't found any remove or loss of these resources, but as soon as the code goes to main page to scheduler events , the modifiedAppointment has 2 (binded) resources lost.

I'm in jeopardy, please help me  >_<

Egor
Top achievements
Rank 1
 answered on 30 Jul 2009
1 answer
111 views

Hi

I am using combobox, but problem is it is not getting align to the postion i am setting expecting to. Whenever I put mouse over dropdown it is moving to the left side and when mouse is out , it goes back to previous position.

I am having simple code.... as follows

 

<

telerik:RadComboBox ID="ddlGroup" runat="server" BorderStyle="None"

 

 

AllowCustomText="false" EnableTextSelection="false"

 

 

ShowToggleImage="true" Skin="Outlook" Width="184px" >

 

 

</telerik:RadComboBox>

Please Suggest the way to fix it. I want it should not move from its position.

Thanks and Regards,
Pradip

 

Kamen Bundev
Telerik team
 answered on 30 Jul 2009
2 answers
359 views
Hi! I have a grid which has binaryimagecolumn which binds data in sql db. My problem is I still can't display the image correctly in the grid, even if the object which corresponds into the binaryimagecolumn has a byte[] type in c# and image type in sql database.

markup:

<

 

telerik:GridBinaryImageColumn DataField="PictureImg" HeaderText="Image" UniqueName="PictureImg"

 

 

ImageAlign="Middle" ImageHeight="200px" ImageWidth="200px" ResizeMode="Fit">

 

 

<HeaderStyle Width="10%" />

codebehind:

 

 

protected class PictureTemplate

 

 

 

 

{

 

public Guid PictureID { get; set; }

 

 

public string PictureName { get; set; }

 

 

public byte[] PictureImg { get; set; }

 

 

public string PictureDesc { get; set; }

 

}


 

protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)

 

{

 

List<PictureTemplate> picTemplate;

 

 

using (DianaOnlinePhotoEntities db = new DianaOnlinePhotoEntities())

 

{

picTemplate = (

from p in db.tblPicture

 

 

where p.PictureID != null

 

 

select new PictureTemplate

 

{

PictureID = p.PictureID,

PictureName = p.PictureName,

PictureImg = p.PictureImg,

PictureDesc = p.PictureDesc

}).ToList();

RadGrid1.DataSource = picTemplate;

}

}



Hope I can fix the problem, Thanks!!

reynald lawrence
Top achievements
Rank 1
 answered on 30 Jul 2009
3 answers
189 views
I am trying to retrieve the filter client-side to pass to a dialog window being displayed.  I am calling the get_filterExpression() method on the MasterTableView but an empty string is being returned.  Is this a bug or does it require something special.

function GetFilterData() {  
 
    var filterString = "";  
      
    var filter = $find(GridMasterView).get_filterExpressions();  
    for (var i = 0; i < filter.length; i++)  
        filterString += filter[i].get_columnUniqueName() + "~" + expression.get_fieldValue() + "~";  
          
    return filterString;  
          
} 

Please let me know how I can accomplish this.

Thanks

Stephen
Veli
Telerik team
 answered on 30 Jul 2009
4 answers
284 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
220 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
373 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
182 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
233 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?