Toggle function

3 posts, 0 answers
  1. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 08 Jan 2010 Link to this post

    Hi,

    Is it possible to create a server-side toggle function for the date selection like the way you demonstrate client side on your site?

    I have to write the selected date to DB and delete it if a date is unselected by the user.

    Thanks for your information.

    Marc
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 11 Jan 2010 Link to this post

    Hello Marc,

    One suggestion is attaching 'SelectionChanged' to RadCalendar and save the SelctedDate in session. Then you can query db to write/delete corresponding date.

    cs:
     
        protected void RadCalendar3_SelectionChanged(object sender, Telerik.Web.UI.Calendar.SelectedDatesEventArgs e) 
        { 
            if (e.SelectedDates.Count != 0) 
            { 
                Session["SelectedDate"] = e.SelectedDates[0].Date; 
                // Add to db 
            } 
            else 
            { 
                // remove date (from session value) from db 
            } 
        } 

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Fit2Page
    Fit2Page avatar
    345 posts
    Member since:
    Feb 2007

    Posted 11 Jan 2010 Link to this post

    Hi,

    I managed to write the Selected Date changes to the DB on OnDateSelected with a Web Service.

    This solved the problem.

    Regards,
    Marc
Back to Top