Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
483 views
I am getting the following error when I run a web page using RadScheduler Custom Provider:

Provider name cannot be null or empty.

I placed in the web config exactly what is supplied in the demo as well as examples posted on the site and I am still getting the above error.

Here is what is within my web.config:

<?xml version="1.0"?><br>
<configuration><br>
  <configSections><br>
    <sectionGroup name="telerik.web.ui"><br>
      <section name="radScheduler" type="Telerik.Web.UI.RadSchedulerConfigurationSection, Telerik.Web.UI, PublicKeyToken=121fae78165ba3d4" allowDefinition="MachineToApplication"/><br>
    </sectionGroup><br>
  </configSections><br>
  <telerik.web.ui><br>
    <radScheduler defaultAppointmentProvider="Integrated"><br>
      <appointmentProviders><br>
        <add name="ClassSchedSchedulerData" type="Scheduler3.RDSchedulerProvider" persistChanges="false"/><br>
      </appointmentProviders><br>
    </radScheduler><br>
  </telerik.web.ui><br>
  <appSettings><br>
    <add key="Telerik.ScriptManager.TelerikCdn" value="Disabled"/><br>
    <add key="Telerik.StyleSheetManager.TelerikCdn" value="Disabled"/><br>
  </appSettings><br>
  <system.web><br>
    <compilation debug="true" targetFramework="4.0"><br>
      <assemblies><br>
        <add assembly="System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><br>
        <add assembly="System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><br>
        <add assembly="System.ServiceModel, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><br>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/><br>
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><br>
        <add assembly="System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><br>
        <add assembly="System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><br>
        <add assembly="System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/><br>
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/><br>
      </assemblies><br>
    </compilation><br>
    <pages><br>
      <controls><br>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/><br>
      </controls><br>
    </pages><br>
    <httpHandlers><br>
      <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/><br>
      <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/><br>
      <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/><br>
      <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/><br>
      <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/><br>
    </httpHandlers><br>
    <httpModules/><br>
  </system.web><br>
  <system.webServer><br>
    <validation validateIntegratedModeConfiguration="false"/><br>
    <modules runAllManagedModulesForAllRequests="true"/><br>
    <handlers><br>
      <remove name="ChartImage_axd"/><br>
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode"/><br>
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd"/><br>
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode"/><br>
      <remove name="Telerik_Web_UI_DialogHandler_aspx"/><br>
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode"/><br>
      <remove name="Telerik_RadUploadProgressHandler_ashx"/><br>
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode"/><br>
      <remove name="Telerik_Web_UI_WebResource_axd"/><br>
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode"/><br>
    </handlers><br>
  </system.webServer><br>
</configuration><br>




This is the following code within my provider:

using System;<br>
using System.Collections.Generic;<br>
using System.Linq;<br>
using System.Web;<br>
using Telerik.Web.UI;<br>
using System.Data;<br>
using SchedEZ.DataAccess;<br>
using SchedEZ.Utilities;<br>
<br>
<br>
namespace Scheduler3<br>
{<br>
    public class RDSchedulerProvider : SchedulerProviderBase    <br>
    {<br>
<br>
<br>
        #region Declarations<br>
<br>
<br>
        private IDictionary<int, Resource> _staff;<br>
        private IDictionary<int, Resource> _students;<br>
        private IDictionary<int, Resource> _equipments;<br>
        private IDictionary<int, Resource> _buildingRooms;<br>
<br>
<br>
        private Boolean _persistChanges = false;<br>
<br>
<br>
        public enum eResourceType<br>
        {<br>
            BuildingRoom = 0,<br>
            Staff = 1,<br>
            Equipment = 2,<br>
            Student = 3<br>
        }<br>
<br>
<br>
        #endregion<br>
<br>
<br>
        #region Properties<br>
<br>
<br>
        #endregion<br>
<br>
<br>
        #region General Code<br>
<br>
<br>
        public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)<br>
        {<br>
            if (config == null)<br>
            {<br>
                throw new ArgumentNullException("config");<br>
            }<br>
<br>
<br>
            string persistChanges = config["persistChanges"];<br>
            if (!string.IsNullOrEmpty(persistChanges))<br>
            {<br>
                if (!bool.TryParse(persistChanges, out _persistChanges))<br>
                {<br>
                    throw new Exception("Invalid value for PersistChanges attribute. Use 'True' or 'False'.");<br>
                }<br>
            }<br>
            else<br>
            {<br>
                _persistChanges = true;<br>
            }<br>
<br>
<br>
        }<br>
<br>
<br>
        public override IDictionary<ResourceType, IEnumerable<Resource>> GetResources(ISchedulerInfo schedulerInfo)<br>
        {<br>
            Dictionary<ResourceType, IEnumerable<Resource>> resCollection = new Dictionary<ResourceType, IEnumerable<Resource>>();<br>
<br>
<br>
            var myInfo = schedulerInfo as RDSchedulerInfo;<br>
            int classSchedID = myInfo.ClassSchedID;<br>
<br>
<br>
            // load the resources<br>
            if (_staff == null)<br>
                _staff = ResourceStaff.loadResources(classSchedID);<br>
<br>
<br>
            if (_equipments == null)<br>
                _equipments = ResourceEquipment.loadResources(classSchedID);<br>
<br>
<br>
            if (_students == null)<br>
                _students = ResourceStudent.loadResources(classSchedID);<br>
<br>
<br>
            if (_buildingRooms == null)<br>
                _buildingRooms = ResourceBuildingRoom.loadResources(classSchedID);<br>
<br>
<br>
<br>
<br>
            resCollection.Add(new ResourceType(Enum.GetName(typeof(eResourceType), eResourceType.Staff), true), _staff.Values);<br>
            resCollection.Add(new ResourceType(Enum.GetName(typeof(eResourceType), eResourceType.Student), true), _students.Values);<br>
            resCollection.Add(new ResourceType(Enum.GetName(typeof(eResourceType), eResourceType.BuildingRoom), false), _buildingRooms.Values);<br>
            resCollection.Add(new ResourceType(Enum.GetName(typeof(eResourceType), eResourceType.Equipment), true), _equipments.Values);<br>
<br>
<br>
            return resCollection;<br>
        }<br>
<br>
<br>
        public override IEnumerable<Appointment> GetAppointments(ISchedulerInfo schedulerInfo)<br>
        {<br>
            var myInfo = schedulerInfo as RDSchedulerInfo;<br>
            int classSchedID = myInfo.ClassSchedID;<br>
<br>
<br>
            List<Appointment> appointments = new List<Appointment>();<br>
<br>
<br>
            DataSet ds = ClassSchedWeekDayTime.getDataView_ByClassSchedID(classSchedID);<br>
<br>
<br>
            if (!ds.IsEmpty())<br>
            {<br>
                foreach(DataRow dr in ds.Tables[0].Rows)<br>
                {<br>
                    // create an appointment based on the data collected<br>
                    Appointment appt = ClassSchedule.addAppointment(dr);<br>
<br>
<br>
                    // load resources<br>
                    LoadResources(appt);<br>
<br>
<br>
                    // add to the appointments list<br>
                    appointments.Add(appt);<br>
                }<br>
<br>
<br>
            }<br>
<br>
<br>
            return appointments;<br>
        }<br>
<br>
<br>
<br>
<br>
        private void LoadResources(Appointment apt)<br>
        {<br>
            // set the resource for each type<br>
<br>
<br>
            //Student<br>
            // students will be in every class schedule<br>
            foreach (KeyValuePair<int, Resource> res in _students)<br>
                apt.Resources.Add(res.Value);<br>
<br>
<br>
            //Staff<br>
            List<Staff> sf = ResourceStaff.FindByID(apt.ID.toInt());<br>
            if (!sf.IsEmpty())<br>
            {<br>
                foreach (Staff itm in sf)<br>
                    apt.Resources.Add(_staff[itm.StaffId]);<br>
            }<br>
<br>
<br>
            //Equipment<br>
            List<Equipment> eq = ResourceEquipment.FindByID(apt.ID.toInt());<br>
            if (!eq.IsEmpty())<br>
            {<br>
                foreach (Equipment itm in eq)<br>
                    apt.Resources.Add(_equipments[itm.EquipmentId]);<br>
            }<br>
<br>
<br>
            //Equipment<br>
            List<BuildingRoom> br = ResourceBuildingRoom.FindByID(apt.ID.toInt());<br>
            if (!br.IsEmpty())<br>
            {<br>
                foreach (BuildingRoom itm in br)<br>
                    apt.Resources.Add(_buildingRooms[itm.BuildingRoomID]);<br>
            }<br>
<br>
<br>
        }<br>
<br>
<br>
        public override void Insert(ISchedulerInfo schedulerInfo, Appointment appointmentToInsert)<br>
        {<br>
            base.Insert(schedulerInfo, appointmentToInsert);<br>
        }<br>
<br>
<br>
        public override void Update(ISchedulerInfo schedulerInfo, Appointment appointmentToUpdate)<br>
        {<br>
            base.Update(schedulerInfo, appointmentToUpdate);<br>
        }<br>
<br>
<br>
        public override void Delete(ISchedulerInfo schedulerInfo, Appointment appointmentToDelete)<br>
        {<br>
            base.Delete(schedulerInfo, appointmentToDelete);<br>
        }<br>
<br>
<br>
        #endregion<br>
    }<br>
<br>
<br>
}<br>


I really need help with this. A quick response to my issue would be greatly appreciated...

thanks in advance


xtremex xploit
Top achievements
Rank 1
 answered on 04 Nov 2015
4 answers
194 views
Hi,
My Environment: VS 2010 SP 1, EF 4/5, Teleri RadControls AJAC Q3 SP1 - 12.3.1205.0

Protected Sub RadGrid1_NeedDataSource(sender As Object, e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid1.NeedDataSource
 
        Dim d As New Ares4AgsmEntities
 
        Dim q = From i In d.Computer
                Select i.SamAccountName, i.SerialNumber
 
        RadGrid1.DataSource = q
 
 
 
    End Sub
Bind RadGrid to EF context executes the same query 3 times (see SQL Profiler). I also bind GridView to EF context this executs query 1 time.
Bind RadGrid to EntityDatasource this executes the query 1 time.
Whats the problem ? Is this a default behavior ?

Huy Viet
Top achievements
Rank 1
 answered on 04 Nov 2015
4 answers
429 views

Hello,

 Does anyone have an example to do the following?

 I have a RadHTMLChart on an ASP.NET form.

I have this bound to the SQL select.

It displays the data in the chart perfectly.  No problems.

What I want to do, is make it so that the RadHTMLChart is updated when the data is changed.

I have created a JavaScript iteration, and I call the Repaint on the RadHTMLChart, but this does not appear to query the data again.  (I can't tell if that is the problem, or the problem is that the Ajax isn't displaying the results.  Not sure how to figure out which is the problem?)

I have looked at the Telerik examples extensively, and I've seen the real time examples regarding static data (Not from SQL) and I've seen the SQL examples that are not real-time.  I'm looking for an example that basically puts the two together.  A real time way to update the RadHTMLChart when the data is changed.

 If this isn't clear, let me know and I'll reword it.  Any basic examples that anyone has would be great.  I just need something to work off of, because I can't seem to get the results I need from the examples I've found online.

 

Thank You

Kevin J Baird

Kevin J
Top achievements
Rank 1
 answered on 04 Nov 2015
3 answers
189 views

HI, When i am trying to open a filter options menu in the radgrid filter column, the menu is not showing. I am using safari browser in MAC machine.

The same functionality is working fine with other browsers in windows platform and also in chrome in MAC.

I have also attached the javascript error that i am receiving.

Pavlina
Telerik team
 answered on 04 Nov 2015
2 answers
155 views

Hello,

 I have a page that has a treeview that lists our different zip files of data that users can download.  When the user click a zip file to download and they are not logged in they are redirected to the login page.  After they login they are redirected to the page where my zip files are listed in my treeview.  The issue now is the page reloaded and the tree is collapsed.  How can I open the tree to the specific node the user clicked on?  I can put the node text in a query string and page it back and forth but how can I take the query string and open the treeview?

 

Thank you

Ivan Danchev
Telerik team
 answered on 04 Nov 2015
2 answers
375 views

On my aspx page I have a RadGrid with the following:

<telerik:GridTemplateColumn HeaderText="View Order Details" UniqueName="OrderDetails">
<ItemTemplate>
<div style="vertical-align: middle; text-align: center;">
<asp:ImageButton ID="btnOrder" ImageUrl="~\Content\Images\list.png" runat="server" Height="25px" Width="25px"  OnClick="openOrderDetails_Click"/>
</div>
</ItemTemplate>
</telerik:GridTemplateColumn>

 

I have also tried replacing the onclick method with the below and calling the relevant switch statement (after putting in the OnItemCommand in the grid) :

CommandName="OrderDetails" CommandArgument='<%# Bind("identity") %>'

 

I have a test button outside my radgrid and when I click on this the window opens without any issues:

<telerik:RadButton ID="test" runat="server" Text="Test" Skin="MetroTouch" OnClick="openOrderDetails_Click"></telerik:RadButton>

 

Can anyone help with getting this to open from the button within the grid

Gavin
Top achievements
Rank 1
 answered on 04 Nov 2015
2 answers
58 views

How do you spawn an edit window from a detail grid with info from the grid? I can get the window to come up but I'm not clear on how to pass information from the detail grid to the form like an item id for instance.

Joe
Top achievements
Rank 2
 answered on 04 Nov 2015
1 answer
143 views

Hi, 

I would like to seek help if its possible to edit and add fields in the "New Appointment" window when Option is selected such as a field for who you want to assign it based on a linked email table and so on. 

Thanks in advance. 

Ivan Danchev
Telerik team
 answered on 04 Nov 2015
3 answers
133 views

I am trying to figure out how to use a RadGrid in a C# ASP.net 4.5 project that uses data entity framework version 6.  I can not seem to find good reliable up to date documentation on how to bind the entity framework to the Gridview.  I have started here http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/data-binding/understanding-data-binding/telerik-radgrid-data-binding-basics but can not find and information on using the data entity.  I found some documentation and videos that show dropping a data entity control from the toolbox and setting the properties of the control via the smart tag, but that functionality is not available in the 4.5 framework.

 

Can some please provide some good resources that can assist me in transitioning from an ASP.net Gridview to the Telerik RadGridview?

 

Thanks

Viktor Tachev
Telerik team
 answered on 04 Nov 2015
1 answer
90 views

We are attempting to use the Telerik Diagram to create a Living Value Stream.  The Value Stream has connectors between each process on the traditional path, however there are also an additional connectors for a special process that does not go down the traditional path.  (I have attached a screen shot of a portion of the Value Stream.)

Is it possible to do this?

 

Thank you for your assistance.

 

 

Slav
Telerik team
 answered on 04 Nov 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?