Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
300 views
Hi,
i just want to disable and Enable ASp Drop Down list inside Rad grid form   based on value of another combo box.

Example
Combo.selectedvalue="Yes" then<BR>Enable Combo2<BR>else<BR>Disable Combo2


Using Client Side onslectedindexchanged method in the ASP drop down i tried lot of ways but not working
Shinu
Top achievements
Rank 2
 answered on 22 Sep 2010
1 answer
95 views
This is a brainstorming question. Should be easy. I'm writing a scheduling program and I can't conceptualize how to accomplish what I need to.  Here is the scenario:

1)You have a group of electricians, carpenters, and plumbers who log onto a RadSchedule and enter their various available days and times.
2) A person submits a request.  "I need a plumber for 3:00-4:00 on 9/17/2010."
3) A coordinator gets the request and needs to be able to see that on that day and time, plumbers Joe, Ralph, and Veronica are available.
4) The trick is how do you show that Plumber Veronica is scheduled to work from 8:00 to 5:00 and then schedule her for the  3:00-4:00  slot while showing that she is still available for the remaining  8:00-2:00 and 4:00-5:00 slots? You would be deleting and recreating 3 different appointment records.
5) I need the database to simultaneously tell me that Veronica has an 8 hour block "available" and these are the parts of that 8 hours that are taken up already.


BAD ANSWER: Here is my current idea which really isn't a good solution.  The plumbers, electricians, and carpenters all log onto the system and with radscheduler, they select their available schedules. I mark these with a resource named "Available".  Now I can ask RadScheduler to tell me "Who's available on this day?"  I then see that Veronica is available and I create a NEW and SEPARATE 3:00-4:00 appointment which shows up along side her "Available" appointment.  Now I can see Veronica's usual schedule and those parts of it that are taken up already.  Here is the kicker.  This gets to be a mess when there are 19 plumbers available at the same time.  You then must either toggle various appointments on and off or go through each person available and look at their schedules separately.

ANOTHER IDEA: I don't know how to do this because database programming with DateTimes is Hell on wheels but maybe Joe Electrician could log on and choose 8:00-5:00 on  Tuesdays as being available.  Then behind the scenes, you grab that 8:00-5:00 appointment and replace it with 18 separate half hour appointments between 8:00-5:00.  Then the Coordinator receiving the request for 3:00-4:00 could just delete the "little" appointments and replace them with the new appointment time being scheduled.

I'm writing this here because I hope I'm missing something totally obvious in using RadScheduler.  Maybe there is some combination of resources I could use that would accomplish this.  I can' think of it though.

Thanks and Best to All!

Veronica
Telerik team
 answered on 22 Sep 2010
3 answers
140 views
Hello again,

How can I remove rad Cloud item from tag list by using javascript from Client Side.?

I couldn't see any function about this property in help document. 

I want to remove when user click on it. Maybe we can put remove images left side each tag.

can we put dynamic "remove image" ( maybe image button ) for every tag ?  Pls help.

 

function OnClientItemClicking(cloud, args) {

 

 

if (cloud.get_id() == "RadTagCloudCustomer")
 
{

 

 ??????? // remove this item from list.

}

 

 

args.set_cancel(

true);

 

}



Pero
Telerik team
 answered on 22 Sep 2010
1 answer
181 views
Hello,

I have an app which uses various Telerik controls (radgrid, radcontextmenu).  The app works fine in development but not on the production server.  Can anyone tell me why the client-side events (selecting radgrid row, right-clicking radgrid for context menu popup) dont work on the production server?  I have other apps on the server that don't use Telerik controls that work fine.

Any help appreciated!
Thanks in advance.
Dimo
Telerik team
 answered on 22 Sep 2010
1 answer
154 views
Hi is there anyone who knows how i can bind data to a grid at runtime and be able to edit the grid and submit changes to the database.Reason why i need to bind at runtime is because the number of columns in my dataset varies all the time. Thank you.
Tsvetoslav
Telerik team
 answered on 22 Sep 2010
1 answer
54 views
Dear Team,

i am using rad grid inside grid dropdown .
when click button or any Event after will disappare griddropdown values inside the grid .

Give me a Correct Solutuions.

With Regards,
S.Kannadasan
Pavlina
Telerik team
 answered on 22 Sep 2010
1 answer
72 views
Hi,
I am struck with a problem that i want to achieve self referencing hierarchy using rad grid but when i bind grid with data source with grid it bind records but  not correctly.
For example Emp1 has null parent and emp2 has parent value of emp1. so records must be look like as follow
emp1
   emp2

but it shows like follow
emp1
    emp2
emp2

Look emp2 display as child as parent as well. which is not correct format. i dont know what i am missing.

I am following complete example given in below link http://demos.telerik.com/aspnet-ajax/grid/examples/hierarchy/selfreferencing/defaultcs.aspx

Please help...

one more question that is it possible to implement paging in self hierarchy grid????????


waiting for your reply... thanks in advance..
Pavlina
Telerik team
 answered on 22 Sep 2010
2 answers
189 views
version 2009.3.1208 35
Followed the 'getting started' fairly closely. Used the object data source method. Obviously I needed to deviate to a persisted datasource. I also needed to add a couple resources. Location/room and User. Once again followed very closely the dataset schema design.
ok so here we are:
Every time I go to edit the appt. both the location and user resource are not selected to their respective values. ie 1,3. I can confirm that the data is good.
im using a sql datasource exactly as the demos show here to populate dropdowns..which they do: http://demos.telerik.com/aspnet-ajax/scheduler/examples/resources/defaultvb.aspx

When I move the appt I notice it posts back to update the event. I find all the items in the updateAppt except the user and room. i have extended the apptInfo class. I ended up rewriting to check if it was nothing then leave it what it used to be.

Can anyone tell me what might the issue be?
html
<telerik:RadScheduler ID="RadScheduler1" runat="server" DataEndField="End" 
         DataKeyField="ID" DataRecurrenceField="RecurrenceRule" 
         DataRecurrenceParentKeyField="RecurrenceParentID" StartInsertingInAdvancedForm="true" StartEditingInAdvancedForm="true" 
         DataSourceID="ObjectDataSource1" DataStartField="Start" ShowFooter="false" MinutesPerRow="15" DayStartTime="7:00" DayEndTime="21:00"
         DataSubjectField="Subject">
          <ResourceTypes>
                 <telerik:ResourceType KeyField="LocID" Name="Room" TextField="LocCity" ForeignKeyField="RoomID"
                     DataSourceID="DS_Locations" />
                 <telerik:ResourceType KeyField="UserID" Name="User" TextField="UserFName" ForeignKeyField="UserID"
                     DataSourceID="DS_Users" />
             </ResourceTypes>
     </telerik:RadScheduler>
   
 <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
     DeleteMethod="DeleteAppointment" InsertMethod="InsertAppointment" 
     SelectMethod="AllData" TypeName="AppointmentList" 
     UpdateMethod="UpdateAppointment">
     <DeleteParameters>
         <asp:Parameter Name="ID" Type="String" />
     </DeleteParameters>
     <InsertParameters>
         <asp:Parameter Name="Subject" Type="String" />
         <asp:Parameter Name="Start" Type="DateTime" />
         <asp:Parameter Name="End" Type="DateTime" />
         <asp:Parameter Name="RecurrenceRule" Type="String" />
         <asp:Parameter Name="RecurrenceParentID" Type="Object" />
         <asp:Parameter Name="RecurrenceState" Type="Object" />
         <asp:Parameter Name="RoomID" Type="Int32" />
         <asp:Parameter Name="UserID" Type="Int32" />
           
     </InsertParameters>
     <UpdateParameters>
         <asp:Parameter Name="ID" Type="String" />
         <asp:Parameter Name="Subject" Type="String" />
         <asp:Parameter Name="Start" Type="DateTime" />
         <asp:Parameter Name="End" Type="DateTime" />
         <asp:Parameter Name="RecurrenceRule" Type="String" />
         <asp:Parameter Name="RecurrenceParentID" Type="Object" />
         <asp:Parameter Name="RecurrenceState" Type="Object" />
         <asp:Parameter Name="RoomID" Type="Int32" />
         <asp:Parameter Name="UserID" Type="Int32" />
     </UpdateParameters>
 </asp:ObjectDataSource>
 <br />
 <asp:SqlDataSource ID="DS_Users" runat="server" 
     ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
     SelectCommand="SELECT * FROM [Tbl_Users]"></asp:SqlDataSource>
 <asp:SqlDataSource ID="DS_Locations" runat="server" 
     ConnectionString="<%$ ConnectionStrings:ApplicationServices %>" 
     SelectCommand="SELECT * FROM [Tbl_Locations]"></asp:SqlDataSource>

AppointmentList.vb
  Public Shared Function buildSess() As List(Of AppointmentInfo)
        Dim dt As DataTable = New DataTable
  
        Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("ApplicationServices").ToString)
  
            Dim da As New SqlDataAdapter()
            da.SelectCommand = New SqlCommand("Select * from Appointments", con)
            da.Fill(dt)
            Dim sessApts As List(Of AppointmentInfo) = New List(Of AppointmentInfo)()
            For Each row In dt.Rows
                Dim ai As New AppointmentInfo(row.Item("Subject"), row.Item("Start"), row.Item("End"))
                ai.ID = row.item("ApptGuid")
                ai.RecurrenceRule = row.item("RecurrenceRule").ToString
                ai.RecurrenceParentID = CType(row.item("RecurrenceParentID"), [Object])
                ai.RoomID = row.item("RoomID").ToString
                ai.UserID = row.item("UserID").ToString
                sessApts.Add(ai)
            Next
            Return sessApts
        End Using
    End Function
  
    Public Shared Function AllData() As List(Of AppointmentInfo)
        Return buildSess()
        '    Dim sessApts As List(Of AppointmentInfo) = TryCast(HttpContext.Current.Session(AppointmentsKey), List(Of AppointmentInfo))
        'Dim sessApts As List(Of AppointmentInfo) = TryCast(HttpContext.Current.Session(AppointmentsKey), List(Of AppointmentInfo))
        'If sessApts Is Nothing Then
        '    sessApts = buildSess() ' New List(Of AppointmentInfo)()
        '    HttpContext.Current.Session(AppointmentsKey) = sessApts
        'End If
        'Return sessApts
    End Function
    Public Shared Sub InsertAppointment(ByVal Subject As String, ByVal Start As DateTime, ByVal [End] As DateTime, _
                                        ByVal RecurrenceRule As String, ByVal RecurrenceParentID As [Object], _
                                        ByVal RecurrenceState As Telerik.Web.UI.RecurrenceState, ByVal RoomID As Int32, ByVal UserID As Int32)
        '   Dim sessApts As List(Of AppointmentInfo) = AllData()
        Dim ai As New AppointmentInfo(Subject, Start, [End])
        ai.RecurrenceRule = RecurrenceRule
        ai.RecurrenceParentID = RecurrenceParentID
        ai.RecurrenceState = RecurrenceState
        ai.RoomID = RoomID
        ai.UserID = UserID
        '    sessApts.Add(ai)
  
  
        Dim guid As String = ai.ID
        'add it to the db
        Dim SQL As String = "INSERT INTO Appointments " & _
"  ([Subject]" & _
", [Description]" & _
", [Start]" & _
", [End]" & _
", [RecurrenceRule]" & _
", [RecurrenceParentID]" & _
", [Reminder]" & _
", [Annotations], ApptGuid, RoomID, UserID) " & _
"  VALUES (" & _
"  @Subject" & _
", @Description" & _
", @Start" & _
", @End" & _
", @RecurrenceRule" & _
", @RecurrenceParentID" & _
", @Reminder" & _
", @Annotations, @ApptGuid, @RoomID, @UserID)"
  
        ' RecurrenceParentID.ToString = Nothing
        Using con As New SqlConnection(ConfigurationManager.ConnectionStrings("ApplicationServices").ToString)
            Dim cmd As New SqlCommand
            cmd.CommandText = SQL
            cmd.Connection = con
            cmd.Parameters.Add("@Subject", Data.SqlDbType.NVarChar).Value = Subject
            cmd.Parameters.Add("@Description", Data.SqlDbType.NVarChar).Value = ""
            cmd.Parameters.Add("@Start", Data.SqlDbType.DateTime).Value = Start
            cmd.Parameters.Add("@End", Data.SqlDbType.DateTime).Value = [End]
            cmd.Parameters.Add("@RecurrenceRule", Data.SqlDbType.NVarChar).Value = IIf(IsNothing(RecurrenceRule), System.Data.SqlTypes.SqlString.Null, RecurrenceRule)
            cmd.Parameters.Add("@RecurrenceParentID", Data.SqlDbType.Int).Value = IIf(RecurrenceParentID Is Nothing, System.Data.SqlTypes.SqlInt32.Null, GetParentID(RecurrenceParentID))
            cmd.Parameters.Add("@Reminder", Data.SqlDbType.NVarChar).Value = ""
            cmd.Parameters.Add("@Annotations", Data.SqlDbType.NVarChar).Value = ""
            cmd.Parameters.Add("@ApptGuid", Data.SqlDbType.NVarChar).Value = guid
            cmd.Parameters.Add("@RoomID", SqlDbType.Int).Value = IIf(IsNumeric(RoomID) = False, SqlTypes.SqlInt32.Null, RoomID)
            cmd.Parameters.Add("@UserID", SqlDbType.Int).Value = IIf(IsNumeric(UserID) = False, SqlTypes.SqlInt32.Null, UserID)
            '  cmd.Parameters.Add("@RecurrenceState", Data.SqlDbType.NVarChar).Value = IIf(RecurrenceState.NotRecurring, System.Data.SqlTypes.SqlString.Null, RecurrenceState)
            cmd.Connection.Open()
            cmd.ExecuteNonQuery()
        End Using
  
    End Sub
    Public Shared Sub DeleteAppointment(ByVal ID As String)
        Dim sessApts As List(Of AppointmentInfo) = AllData()
        sessApts.Remove(FindById(ID, sessApts))
  
        Using con As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("ApplicationServices").ToString)
            Dim cmd As New SqlCommand("Delete from Appointments where ApptGuid = @ID", con)
            cmd.Parameters.Add("@ID", SqlDbType.NVarChar).Value = ID
            cmd.Connection.Open()
            cmd.ExecuteNonQuery()
        End Using
  
  
    End Sub
    Public Shared Sub UpdateAppointment(ByVal ID As String, ByVal Subject As String, ByVal Start As DateTime, ByVal [End] As DateTime, ByVal RecurrenceRule As String, ByVal RecurrenceParentID As [Object], _
     ByVal RecurrenceState As Telerik.Web.UI.RecurrenceState, ByVal RoomID As Int32, ByVal UserID As Int32)
        Dim sessApts As List(Of AppointmentInfo) = AllData()
        Dim ai As AppointmentInfo = FindById(ID, sessApts)
        ai.Subject = Subject
        ai.Start = Start
        ai.[End] = [End]
        ai.RecurrenceRule = RecurrenceRule
        ai.RecurrenceParentID = RecurrenceParentID
        ai.RecurrenceState = RecurrenceState
        ai.RoomID = IIf(RoomID = 0, ai.RoomID, RoomID)
        ai.UserID = IIf(UserID = 0, ai.UserID, UserID)
  
        Dim SQL As String = "Update Appointments set subject = @subject, [start] = @start, [end] = @end " & _
            " , RecurrenceRule = @RecurrenceRule, RecurrenceParentID = @RecurrenceParentID, RoomID = @RoomID, UserID = @UserID where ApptGuid = @ApptGuid"
        Using con As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("ApplicationServices").ToString)
            Dim cmd As SqlCommand = New SqlCommand(SQL, con)
            cmd.Parameters.Add("@Subject", Data.SqlDbType.NVarChar).Value = Subject
            cmd.Parameters.Add("@Description", Data.SqlDbType.NVarChar).Value = ""
            cmd.Parameters.Add("@Start", Data.SqlDbType.DateTime).Value = Start
            cmd.Parameters.Add("@End", Data.SqlDbType.DateTime).Value = [End]
            cmd.Parameters.Add("@RecurrenceRule", Data.SqlDbType.NVarChar).Value = IIf(RecurrenceRule = Nothing, System.Data.SqlTypes.SqlString.Null, RecurrenceRule)
            cmd.Parameters.Add("@RecurrenceParentID", Data.SqlDbType.Int).Value = IIf(RecurrenceParentID = Nothing, System.Data.SqlTypes.SqlInt32.Null, GetParentID(RecurrenceParentID))
            cmd.Parameters.Add("@Reminder", Data.SqlDbType.NVarChar).Value = ""
            cmd.Parameters.Add("@Annotations", Data.SqlDbType.NVarChar).Value = ""
            cmd.Parameters.Add("@ApptGuid", Data.SqlDbType.NVarChar).Value = ai.ID
            cmd.Parameters.Add("@RoomID", SqlDbType.Int).Value = IIf(ai.RoomID = 0, SqlTypes.SqlInt32.Null, ai.RoomID)
            cmd.Parameters.Add("@UserID", SqlDbType.Int).Value = IIf(ai.UserID = 0, SqlTypes.SqlInt32.Null, ai.UserID)
            cmd.Connection.Open()
            cmd.ExecuteNonQuery()
  
  
        End Using
  
  
  
  
    End Sub
    Public Shared Function FindById(ByVal ID As String, ByVal sessApts As List(Of AppointmentInfo)) As AppointmentInfo
        For Each ai As AppointmentInfo In sessApts
            If ai.ID = ID Then
                Return ai
            End If
        Next
        Return Nothing
    End Function
  
    Public Shared Function GetParentID(ByVal RecurrenceParentID As String) As Int32
        'Dim i As Int32
        If RecurrenceParentID IsNot Nothing Then
            Using con As SqlConnection = New SqlConnection(ConfigurationManager.ConnectionStrings("ApplicationServices").ToString)
                Dim cmd As SqlCommand = New SqlCommand("Select ID from Appointments where ApptGuid = @Guid", con)
                cmd.Parameters.Add("@Guid", SqlDbType.NVarChar).Value = RecurrenceParentID
                cmd.Connection.Open()
                Dim i As Integer = cmd.ExecuteScalar
                Return i
            End Using
        Else
            Return Nothing
        End If
  
        '  Return (cmd.ExecuteScalar)
  
  
    End Function

AppointmentInfo.vb
Private idString As String
Private subj As String
Private startTime As DateTime
Private endTime As DateTime
Private RID As String
Private UID As String
Private recur As String
Private recurParent As Object
Private recurState As RecurrenceState
Public Property RoomID() As String
    Get
        Return RID
    End Get
    Set(ByVal value As String)
        RID = value
    End Set
End Property
Public Property UserID() As String
    Get
        Return UID
    End Get
    Set(ByVal value As String)
        UID = value
    End Set
End Property
Public Property ID() As String
    Get
        Return idString
    End Get
    Set(ByVal value As String)
        idString = value
    End Set
End Property
Public Property Subject() As String
    Get
        Return subj
    End Get
    Set(ByVal value As String)
        subj = value
    End Set
End Property
Public Property Start() As DateTime
    Get
        Return startTime
    End Get
    Set(ByVal value As DateTime)
        startTime = value
    End Set
End Property
Public Property [End]() As DateTime
    Get
        Return endTime
    End Get
    Set(ByVal value As DateTime)
        endTime = value
    End Set
End Property
Public Property RecurrenceRule() As String
    Get
        Return recur
    End Get
    Set(ByVal value As String)
        recur = value
    End Set
End Property
Public Property RecurrenceParentID() As Object
    Get
        Return recurParent
    End Get
    Set(ByVal value As Object)
        recurParent = value
    End Set
End Property
Public Property RecurrenceState() As RecurrenceState
    Get
        Return recurState
    End Get
    Set(ByVal value As RecurrenceState)
        recurState = value
    End Set
End Property
Private Sub New()
    Me.idString = Guid.NewGuid().ToString()
End Sub
Public Sub New(ByVal subject As String, ByVal start As DateTime, ByVal [end] As DateTime)
    Me.New()
    Me.subj = subject
    Me.startTime = start
    Me.endTime = [end]
End Sub

Peter
Telerik team
 answered on 22 Sep 2010
2 answers
171 views

Hi ,

i am using RadDatePicker control and i am getting below error...

Value of '1900-01-01 00:00:00' is not valid for 'SelectedDate'. 'SelectedDate' should be between 'MinDate' and 'MaxDate'.
Parameter name: SelectedDate

while the date is in table is 1900-01-01.

<telerik:RadDatePicker runat="server" DbSelectedDate='<%# Bind("StartDate") %>' 
                                    ID="txtStartDate" style="z-index: 109; left: 90px; position: absolute; 
                                    top: 180px" Width="220px" Skin="Office2007"> 
                                    <DateInput ID="DateInput1" runat="server" DateFormat="yyyy-MM-dd"
                                        ReadOnly="true" Font-Names="Tahoma" Font-Size="12px"></DateInput> 
                        </telerik:RadDatePicker>

waiting for your reply.

Please help.





bharat kumar
Top achievements
Rank 1
 answered on 22 Sep 2010
1 answer
86 views
The company I work still has IE6 as our corporate standard so for internal projects we use it. In one of my projects I have a RadEditor control (v2010.1.415.35 / RadControls for ASP.NET AJAX Q1 2010 SP1) in the page and if I paste in a large amount of content it causes IE6 to crash. This is extremely frustrating. Has anyone run into this?
Dobromir
Telerik team
 answered on 22 Sep 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?