Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
73 views
Edit form settings in radgrid itemdatabound in combo box coding
Shinu
Top achievements
Rank 2
 answered on 03 Aug 2009
1 answer
64 views
hi ,Im  Bala,
          i create one radcombobox. items for that combo is retrieved from database.i want to set select as first item every time the page load initially. pls help.

Bala.k
Shinu
Top achievements
Rank 2
 answered on 03 Aug 2009
0 answers
66 views
Hello All

I have a TextBox say Enter Range, when the user click in the test box, i am getting radcalander and giving the choice to select date range, when user select dates i am getting one by one dates in the text box,

But i want only two dates should be selected and display in the text box at a time
can you please solve the problem,i want multiple selection and display which one is min and second is max that is start date  and enddate. the code is given below

<%

@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

 

<%

 

@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

 

<%

 

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

 

<!

 

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<

 

 

html xmlns="http://www.w3.org/1999/xhtml" >

 

<

 

 

head runat="server">

 

 

 

<title>Untitled Page</title>

 

 

 

 

 

</

 

head>

 

<

 

 

body>

 

 

 

<form id="form1" runat="server">

 

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server">

 

 

 

</asp:ScriptManager>

 

 

 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest">

 

 

 

<AjaxSettings>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadScheduler1">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadScheduler1" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

<telerik:AjaxSetting AjaxControlID="RadAjaxManager1">

 

 

 

<UpdatedControls>

 

 

 

<telerik:AjaxUpdatedControl ControlID="RadScheduler1" />

 

 

 

</UpdatedControls>

 

 

 

</telerik:AjaxSetting>

 

 

 

</AjaxSettings>

 

 

 

</telerik:RadAjaxManager>

 

 

 

<telerik:RadScheduler ID="RadScheduler1"

 

 

 

runat="server"

 

 

 

AllowDelete="True"

 

 

 

AllowEdit="True"

 

 

 

AllowInsert="True"

 

 

 

DataEndField="End"

 

 

 

DataKeyField="ID"

 

 

 

DataRecurrenceField="RecurrenceRule"

 

 

 

DataRecurrenceParentKeyField="RecurrenceParentID"

 

 

 

DataSourceID="SqlDataSource1"

 

 

 

DataStartField="Start"

 

 

 

DataSubjectField="Subject"

 

 

 

HoursPanelTimeFormat="h:mm tt"

 

 

 

SelectedDate="2007-11-29" OnAppointmentInsert="RadScheduler1_AppointmentInsert">

 

 

 

</telerik:RadScheduler>

 

 

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:SchedulerDataConnectionString %>"

 

 

 

DeleteCommand="DELETE FROM [Appointments] WHERE [ID] = @ID" InsertCommand="INSERT INTO [Appointments] ([Subject], [Start], [End], [UserID], [RoomID], [RecurrenceRule], [RecurrenceParentID], [Annotations]) VALUES (@Subject, @Start, @End, @UserID, @RoomID, @RecurrenceRule, @RecurrenceParentID, @Annotations)"

 

 

 

SelectCommand="SELECT [ID], [Subject], [Start], [End], [UserID], [RoomID], [RecurrenceRule], [RecurrenceParentID], [Annotations] FROM [Appointments]"

 

 

 

UpdateCommand="UPDATE [Appointments] SET [Subject] = @Subject, [Start] = @Start, [End] = @End, [UserID] = @UserID, [RoomID] = @RoomID, [RecurrenceRule] = @RecurrenceRule, [RecurrenceParentID] = @RecurrenceParentID, [Annotations] = @Annotations WHERE [ID] = @ID">

 

 

 

<DeleteParameters>

 

 

 

<asp:Parameter Name="ID" Type="Int32" />

 

 

 

</DeleteParameters>

 

 

 

<UpdateParameters>

 

 

 

<asp:Parameter Name="Subject" Type="String" />

 

 

 

<asp:Parameter Name="Start" Type="DateTime" />

 

 

 

<asp:Parameter Name="End" Type="DateTime" />

 

 

 

<asp:Parameter Name="UserID" Type="Int32" />

 

 

 

<asp:Parameter Name="RoomID" Type="Int32" />

 

 

 

<asp:Parameter Name="RecurrenceRule" Type="String" />

 

 

 

<asp:Parameter Name="RecurrenceParentID" Type="Int32" />

 

 

 

<asp:Parameter Name="Annotations" Type="String" />

 

 

 

<asp:Parameter Name="ID" Type="Int32" />

 

 

 

</UpdateParameters>

 

 

 

<InsertParameters>

 

 

 

<asp:Parameter Name="Subject" Type="String" />

 

 

 

<asp:Parameter Name="Start" Type="DateTime" />

 

 

 

<asp:Parameter Name="End" Type="DateTime" />

 

 

 

<asp:Parameter Name="UserID" Type="Int32" />

 

 

 

<asp:Parameter Name="RoomID" Type="Int32" />

 

 

 

<asp:Parameter Name="RecurrenceRule" Type="String" />

 

 

 

<asp:Parameter Name="RecurrenceParentID" Type="Int32" />

 

 

 

<asp:Parameter Name="Annotations" Type="String" />

 

 

 

</InsertParameters>

 

 

 

</asp:SqlDataSource>

 

 

 

 

 

 

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

 

 

<script type="text/javascript">

 

 

 

function

 

OnDateSelected(sender, args)

 

{

 

 

var date = new Date(args.Date[0], (args.Date[1]-1), args.Date[2]);

 

$get(

 

"TextBox2").value += date.format("yyyy/MM/dd");

 

$get(

 

"TextBox2").value += " ";

 

$find(

 

"PopEx2").hidePopup();

 

}

 

function

 

pageLoad()

 

{

$find(

 

'PopEx').hidePopup();

 

}

 

 

 

 

 

 

 

 

</script>

 

 

 

</telerik:RadCodeBlock>

 

 

 

 

 

<asp:UpdatePanel ID="UpdatePanel1" runat="server">

 

 

 

<ContentTemplate>

 

 

 

<asp:Label ID="lblSelectDate" runat="server" Text="Enter Date Range"></asp:Label>

 

 

 

<asp:TextBox ID="TextBox1" runat="server">

 

 

 

</asp:TextBox>

 

 

 

<telerik:RadCalendar ID="RadCalendar1" runat="server" AutoPostBack="true" OnSelectionChanged="RadCalendar1_SelectionChanged">

 

 

 

</telerik:RadCalendar>

 

 

 

 

<cc1:PopupControlExtender ID="PopEx" runat="server" TargetControlID="TextBox1"

 

 

 

PopupControlID="RadCalendar1" Position="Bottom" />

 

 

 

</ContentTemplate>

 

 

</

 

asp:UpdatePanel> &nbsp; &nbsp;

 

 

 

 

 

 

 

 

 

</form>

 

</

 

 

body>

 

</

 

 

html>


Code  Behind --------------------------------------------

 

 

protected void RadCalendar1_SelectionChanged(object sender, Telerik.Web.UI.Calendar.SelectedDatesEventArgs e)

 

{

TextBox1.Text +=

 

String.Format("{0} ", e.SelectedDates[e.SelectedDates.Count - 1].Date.ToString("yyyy/MM/dd"));

 

 

}

 

imtiyaz mohammed
Top achievements
Rank 1
 asked on 03 Aug 2009
5 answers
126 views
Hello,

I am implementing a solution where I look at the current time and loop through a series of appointments to see if any of the appointments occur during this minute.  My current solution is not working well as it is inefficient and I'm having trouble finding a way to do a more efficient search.

I am currently looping through the Occurrences collection of the recurrence rule for every appointment in my list (can be hundreds or thousands).  The only limiting factor that makes my algorithm slightly efficient is that I end the loop through the occurrences once the current occurrence time is in the future (or past the current minute).

Question:
I'd like to do a binary search through the occurrences collection.  This would require that I know the # of occurrences in the appointment so I can look at the midway point to determine if it is in the future or past.

ex)
intPosition = Floor(Appointment.Occurrences.Count / 2);
if((DateTime)Appointment.Occurrences[intPosition] > dateCurrent) --> Continue with Binary search...

The only issue is that there does not seem to be any information available to me about the Occurrences collection.

Question
Is there any way to do what I mentioned above?  Is there a better way to approach this given my scenario of having  a list of appointments and needing to see if the current time is the time for any of the appointments?

Thanks in advance,

Ryan


rjb227s
Top achievements
Rank 1
 answered on 03 Aug 2009
2 answers
61 views
Hi All,

The Appointment_MoveEnd captures the new date time of the selected appointment after it is moved within the same resouce, but what if the appointment is moved to a different resource when Scheduler displays mutiple resources. Is there any way i could find new resource details after the appointment has been move to a different resource.

Thanks in advance.

Haroon


Haroon Khokhar
Top achievements
Rank 1
 answered on 02 Aug 2009
0 answers
84 views
hello my friends
i need to insert 30 dynamic links in tabstrip but i don know how i can this???
pleas help me for this problem.
help help help ... ... ... .. .. .. . .
thanks.
Mostafa Tehrani
Top achievements
Rank 1
 asked on 02 Aug 2009
2 answers
181 views
I need to pass a treeview to a webservice. Has someone figured out how to serialize a tv?
If so I could sure use a pointer in the right direction.
Thanks ... Ed
Ed Staffin
Top achievements
Rank 1
 answered on 01 Aug 2009
4 answers
48 views
Hello,

I have data out side of the scheduler , and i want to add in to the scheduler , how can i add?
For e.g

I have checked the check box for Item #1 and Item #2 in to the list box provided out side of the Scheduler , and then user select the particular date , and then on Pressing "Add Item" button (Available out side the scheduler), both the item #1 and Item # 2 should be assigned to that particular date, How should i do?

Please help me ????


Regards
Samir

Samir Patel
Top achievements
Rank 1
 answered on 01 Aug 2009
0 answers
43 views
I've noticed that a Find and Replace All action will show up on the Undo stack in Firefox 3.5, but it doesn't show up on the Undo stack for IE7.  Is this a known issue and is there a fix?
Mark
Top achievements
Rank 1
 asked on 31 Jul 2009
2 answers
84 views
Hi.
I have a grid and would like to open up a pop up window with more details in a panelbar. how can i achive this?
AR
Top achievements
Rank 1
 answered on 31 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?