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

GridDateTimeColumncolumn cannot able to displays dates before 1980/1/1.

1 Answer 8 Views
Grid
This is a migrated thread and some comments may be shown as answers.
vinod
Top achievements
Rank 1
vinod asked on 08 Oct 2008, 07:01 AM
Hello All,


basically GridDateTimeColumncolumn cannot able to displays dates before 1980/1/1. So i not able to use this for Date Of Birth for people who Born before 1980.
How to solve this issue without using template column. i am created RadGrid runtime & add GridDateTimeColumn dynamically.using following code.

  GridDateTimeColumn boundColumn = new GridDateTimeColumn();
                  boundColumn.HeaderText = strColumnName;
                  boundColumn.DataField = Item.Value;
                  boundColumn.UniqueName = strColumnName;
                  boundColumn.DataFormatString = "{0:d}";
                  boundColumn.PickerType = GridDateTimeColumnPickerType.DatePicker;                  RadGridRow.MasterTableView.Columns.Add(boundColumn);

Thanks In Advance....

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 08 Oct 2008, 07:17 AM
Hello vinod,

You can set this in ItemCreated event. Here is an example:

if(e.Item is GridDataItem)
{
    ((e.Item as GridDataItem)["YourColumnUniqueName"].Controls[0] as RadDatePicker).MinDate = ...
}


Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
vinod
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or