This is a migrated thread and some comments may be shown as answers.

GridDateTimeColumn - missing special day - today option.png

2 Answers 32 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vasssek
Top achievements
Rank 1
Vasssek asked on 06 Aug 2010, 11:30 AM
Hello,

I wonder if it is possible to get marked today date in rad grid filtering row on GridDateTimeColumn as it is in Calendar control.

For further information please check pictures in the attachment.

Best regards...

Vasssek

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 1
answered on 06 Aug 2010, 12:31 PM
Hi,


You can perform same from code behind also. Access the RadDatePicker control in ItemDataBound event and add the RadCalendarDay object in the SpecialDays collection

Code:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridFilteringItem)
    {
        GridFilteringItem filterItem = (GridFilteringItem)e.Item;
        RadDatePicker filterCaontrol = (RadDatePicker)filterItem["DateTimeColumnUniqueName"].Controls[0];
        RadCalendarDay calendarDay = new RadCalendarDay();
        calendarDay.Repeatable = Telerik.Web.UI.Calendar.RecurringEvents.Today;
        calendarDay.ItemStyle.CssClass = "rcToday";
        filterCaontrol.SharedCalendar.SpecialDays.Add(calendarDay);
    }
}



-Shinu.
0
Vasssek
Top achievements
Rank 1
answered on 06 Aug 2010, 01:21 PM
Hello,

thanks for your solution, it helped me to solve my issue :))

The result is in attachment.

Have a nice rest of the day...

Vasssek
Tags
Grid
Asked by
Vasssek
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Vasssek
Top achievements
Rank 1
Share this question
or