This is a migrated thread and some comments may be shown as answers.
RadCalendar :Save the Daycell value in database
5 Answers 24 Views
This is a migrated thread and some comments may be shown as answers.
Brown
Top achievements
Rank 1
Brown asked on 14 Jan 2011, 10:17 PM
Hi,
 I am using RadCalendar , in that click on the particular date opening the radwindow. in that window i am entering values those values are displayed on the date (daycell).. I need to display those values in the database .. Could you please tell me how to do this?

5 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 18 Jan 2011, 02:39 PM
Hi Brown,

You could try by wiring the SelectionChanged event of RadCalendar and in its event handler to make a call to the database and update it. This should happen manually since RadCalendar is not a databound control.

Additionally, note that in order to have Selection Change fired, you need to set AutoPostBack="true" for the RadCalendar control.

Best wishes,
Tsvetina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Brown
Top achievements
Rank 1
answered on 18 Jan 2011, 03:55 PM
Hi,

 You are saying while selecting the date... that's fine.. but i have some values in my daycell object. need to save in to the database. could you please tell me how to do that?
0
Tsvetina
Telerik team
answered on 18 Jan 2011, 04:21 PM
Hi Brown,

How exactly are the values added to the cell? Please, post the code relevant to this scenario, so we can get a better idea of how you operate with the calendar control.

Kind regards,
Tsvetina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Brown
Top achievements
Rank 1
answered on 19 Jan 2011, 01:30 AM
Hi,

 This is the way i am going to place the value on the cell.... 


( In my calendar on click on the date opening radwindow in that radwindow entering three values those values are displayed on the date in this manner)

This is for the main page :

 

if (args.get_argument() != null)

 

{

 

var value = args.get_argument().arg1+ BR + args.get_argument().arg2+ BR + args.get_argument().arg3;

 

 

DayCell.innerText = value;

// setting day-cell text

 

 

 




And the Radwindow page:



 

var

 

oWnd = GetRadWindow();

 

 

var textInput1 = document.getElementById("TextBox1");

 

 

var textInput2 = document.getElementById("TextBox2");

 

 

var textInput3 = document.getElementById("TextBox3");

 

 

 

var value = new Object(); // Create new Object

 

 

 

 

 

value.arg1 =

"V=" + textInput1.value;

 

value.arg2 =

"S=" + textInput2.value;

 

value.arg3 =

"O=" + textInput3.value;

 

 

 

if(textInput1.value != 0)

 

{

value.arg1 =

"V=" + textInput1.value;

 

}

 

else

 

 

 

 

{

value.arg1 =

"V=" + 0;

 

}

 

 

if(textInput2.value != 0)

 

{

value.arg2 =

"S=" + textInput2.value;

 

}

 

else

 

 

 

 

{

value.arg2 =

"S=" + 0;

 

}

 

 

if(textInput3.value != 0)

 

{

value.arg3 =

"O=" + textInput3.value;

 

}

 

else

 

 

 

 

{

value.arg3 =

"O=" + 0;

 

}

 

oWnd.close(value);

 

}

 

0
Tsvetina
Telerik team
answered on 23 Jan 2011, 07:34 PM
Hi Brown,

 
Since working with the inner html of cells could be tricky on the server-side, it might be easier for you if you are saving the displayed values in hidden fields on the page and access them directly on the server. As for saving them in the database, as RadCalendar is not a data-bound control, there is no built-in functionality to save values in database, so you will need to do this manually. 

Regards,
Tsvetina
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Asked by
Brown
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Brown
Top achievements
Rank 1
Share this question
or