Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
183 views
Hi Folks,
I Have a Radcombobox itms in which i have loaded some items during onload event.
When if i click the radcombo items i  need to bind the grid view based on the text i have selected and moreover the Page Should not postback.
Thanks
Awaiting for your Reply,
Regards
N.Balaji
balaji
Top achievements
Rank 1
 answered on 19 Jun 2009
1 answer
57 views
Hi,

I experienced the above problem in my application and it also re-producable on the telerik demo page.
http://demos.telerik.com/aspnet-ajax/scheduler/examples/webservice/defaultcs.aspx

The followings are the steps to re-produce the issue.
1.  Goto http://demos.telerik.com/aspnet-ajax/scheduler/examples/webservice/defaultcs.aspx
2.  Create a appointment on an empty timeslot. (say.  Thu 5,  10:00am )
3.  Click the 24 hours link.
4.  The appointment ( created in step 3 ) will be shown up in incorrect start time.  ( It will shown up as Thu 5, 2:00 am)

Any workaround solution for it?

Thanks
Wilson
T. Tsonev
Telerik team
 answered on 19 Jun 2009
3 answers
98 views
I am working under IE8 and windows 7. The scheduler only displays correctly in IE8 compatibility mode. When I am not using the compatibility mode the outline fo the control shows fine. But all the appointments and rows are not wide enough .
Paul
Telerik team
 answered on 19 Jun 2009
1 answer
118 views
The "not-allowed" cursor is not shown on tree nodes having property "allowDrop = false" when dragging from a RadGrid to a RadTreeView.
Is there any way that the "allowDrop" can work the same way as when dragging nodes inside the tree?

Also, when dragging a node to itself and the node is "allowDrop = false" the "not-allowed" cursor keeps showing on every mouseover (even when not dragging nodes).
Yana
Telerik team
 answered on 19 Jun 2009
2 answers
90 views
I want to add just one appointment for each day. Time is not important, I want to add daily one record. Is this possible ? What can I do for this ?


Thanks
Filiz
Top achievements
Rank 1
 answered on 19 Jun 2009
3 answers
216 views
What is the best way to determine if an event is an All Day event from CodeBehind in the AppointmentCreated event?

Thanks,

- Brad
bad nick
Top achievements
Rank 1
 answered on 19 Jun 2009
3 answers
190 views
Hello

Could someone tell me if there is a way of setting causesvalidation=false to the paging on a radgrid, the page numbers seems ok, but when i change the page size it is validating other text boxes on the page.  Is there a way round this?

Many thanks
Princy
Top achievements
Rank 2
 answered on 19 Jun 2009
2 answers
152 views
Hi,

I've tried to implement a custom data provider with a database backend accessed through linq.

I've created the following base environment:

 


Imports System  
Imports System.Collections.Generic  
Imports System.Collections.Specialized  
Imports System.Configuration.Provider  
Imports System.IO  
Imports System.Xml  
Imports Telerik.Web.UI  
 
 
 
Public Class MyDbSchedulerProvider  
    Inherits Telerik.Web.UI.SchedulerProviderBase  
 
 
 
 
    Dim _tasks As Dictionary(Of Integer, Resource)  
 
 
    Public Overrides Sub Delete(ByVal owner As Telerik.Web.UI.RadScheduler, ByVal appointmentToDelete As Telerik.Web.UI.Appointment)  
        Dim db As New hoursDataContext  
        Dim h = (From x In db.demo_hours Where x.id = appointmentToDelete.ID).First  
 
        db.demo_hours.DeleteOnSubmit(h)  
        db.SubmitChanges()  
 
 
    End Sub 
 
    Public Overrides Function GetAppointments(ByVal owner As Telerik.Web.UI.RadScheduler) As System.Collections.Generic.IEnumerable(Of Telerik.Web.UI.Appointment)  
        Dim db As New hoursDataContext  
        Dim appointments As New List(Of Appointment)  
        Dim hours = From x In db.demo_hours  
 
        For Each h In hours  
            Dim apt As New Appointment  
            apt.Subject = h.name  
            apt.ID = h.id  
            apt.Start = h.datestart  
            apt.End = h.enddate  
            appointments.Add(apt)  
        Next 
        Return appointments  
 
    End Function 
 
    Public Overloads Overrides Function GetResourcesByType(ByVal owner As RadScheduler, ByVal resourceType As String) As IEnumerable(Of Resource)  
        Select Case resourceType  
            Case "Task" 
                Return tasks.Values  
            Case Else 
                Throw New InvalidOperationException("Unknown resource type: " + resourceType)  
        End Select 
    End Function 
 
    Private ReadOnly Property tasks() As IDictionary(Of Integer, Resource)  
 
        Get 
            _tasks = New Dictionary(Of Integer, Resource)()  
            For Each student As Resource In Loadtasks()  
                _tasks.Add(DirectCast(student.Key, Integer), student)  
            Next 
            Return _tasks  
        End Get 
    End Property 
 
    Public Overrides Function GetResourceTypes(ByVal owner As Telerik.Web.UI.RadScheduler) As System.Collections.Generic.IEnumerable(Of Telerik.Web.UI.ResourceType)  
        Dim resourceTypes As ResourceType() = New ResourceType(2) {}  
        resourceTypes(0) = New ResourceType("Teacher", False)  
        resourceTypes(1) = New ResourceType("Student", True)  
        Return resourceTypes  
    End Function 
 
    Public Overrides Sub Insert(ByVal owner As Telerik.Web.UI.RadScheduler, ByVal appointmentToInsert As Telerik.Web.UI.Appointment)  
        Dim h As New demo_hour  
        Dim a As Appointment = appointmentToInsert  
        h.datestart = a.Start  
        h.enddate = a.End 
        h.name = a.Subject  
        Dim db As New hoursDataContext  
        db.demo_hours.InsertOnSubmit(h)  
        db.SubmitChanges()  
 
    End Sub 
 
    Public Overrides Sub Update(ByVal owner As Telerik.Web.UI.RadScheduler, ByVal appointmentToUpdate As Telerik.Web.UI.Appointment)  
        Dim db As New hoursDataContext  
        Dim a As Appointment = appointmentToUpdate  
        Dim h = (From x In db.demo_hours Where x.id = a.ID).First  
 
        h.name = a.Subject  
        h.datestart = a.Start  
        h.enddate = a.End 
        db.SubmitChanges()  
 
    End Sub 
 
    Private Function Loadtasks() As IEnumerable(Of Resource)  
        Dim resources As New List(Of Resource)()  
        Dim db As New hoursDataContext  
        Dim tasks = From x In db.Tasks  
 
        For Each T In tasks  
            Dim r As New Resource  
            r.Key = T.taskid  
            r.Type = "Task" 
            r.Text = T.name  
            resources.Add(r)  
        Next 
        Return resources  
 
 
    End Function 
 
 
End Class 
 
 

Then I created a new rad scheduler in a web page in the same project and wrote the following code in the loading event of the page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
        If Not IsPostBack Then 
 
            RadScheduler1.DataKeyField = "ID" 
            RadScheduler1.DataStartField = "Start" 
            RadScheduler1.DataEndField = "End" 
            RadScheduler1.DataSubjectField = "Subject" 
            RadScheduler1.DataRecurrenceField = "RecurrenceRule" 
            RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentID" 
 
        End If 
 
        Dim s As New MyDbSchedulerProvider  
 
        RadScheduler1.DataSource = s  
 
 
 
 
 
 
 
 
 
 
 
 
    End Sub 

When starting the apps throws an exception:
Data source is an invalid type.  It must be either an IListSource, IEnumerable, or IDataSource.

I've been playing around with this for the last couple of hours but can't find a solution. I also tried to inherit from dbschedulerprovider but that didn't work as well.

When i change the loading event to
  Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load  
        If Not IsPostBack Then 
 
            RadScheduler1.DataKeyField = "ID" 
            RadScheduler1.DataStartField = "Start" 
            RadScheduler1.DataEndField = "End" 
            RadScheduler1.DataSubjectField = "Subject" 
            RadScheduler1.DataRecurrenceField = "RecurrenceRule" 
            RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentID" 
 
        End If 
 
        Dim s As New MyDbSchedulerProvider  
 
        RadScheduler1.DataSource = s.GetAppointments(RadScheduler1)  
 
 
 
 
 
    End Sub 
the scheduler diplays properly

CrazyBernie
Top achievements
Rank 1
 answered on 19 Jun 2009
6 answers
392 views
Maybe I missed it somewhere but how do I/can I set the image of a custom command.  When I've tried to add one to a RadDock all I can get to show up is the "gear" looking circle.  For example, I would like to add a custom command for help.  I would like this to show an image of a question mark "?".

Also when I add the commands using the following code from an example I found somewhere:

 DockCommand command = new DockCommand();
 command.AutoPostBack = true;
 command.Name = "Command1";        
 dock.Commands.Add(command);
       
I lose the Minimize command that is there by default. I do have my RadDock's DefaultCommand set to ExpandCollapse.

Thanks!
Petko
Telerik team
 answered on 19 Jun 2009
1 answer
147 views
Hi,

I have two entities, User and ContactDetails which are modelled using the Entity Framework. A single "user" record maps to a single "ContactDetails" record.

What I want to do is list various fields from the User and Contact details and show them in the grid, as this is a 1:1 link I need to show them one a single grid line.

In DataServices I can do this efficiently using something along the lines of "http://server/DataService.svc/UsernameSet?$expand=ContactDetails" which will return me what I need. However I cannot see how to do this with the grid control as I can only specify a single table name in the client settings.

Regards,

Richard

 

 

   <telerik:RadGrid ID="RadGrid1" runat="server">  
      <MasterTableView> 
         <Columns> 
            <telerik:GridBoundColumn DataField="Id" HeaderText="ID" DataType="System.Int32"/>  
            <telerik:GridBoundColumn DataField="LoginId" HeaderText="Login Name" DataType="System.Int32"/>  
            <telerik:GridBoundColumn DataField="ContactDetails.FullName" HeaderText="Contact Name" DataType="System.String"/>  
         </Columns> 
      </MasterTableView> 
      <ClientSettings> 
         <DataBinding Location="DataService.svc" CountPropertyName="UsernameSetCount">  
            <DataService TableName="UsernameSet" /> 
         </DataBinding> 
      </ClientSettings> 
   </telerik:RadGrid> 


 

 

 

Nikolay Rusev
Telerik team
 answered on 19 Jun 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?