|
Rank: Member Groups: Member
Joined: 9/22/2009 Posts: 24
|
Hi, I am using EOGrid first time in my application. I had replaced asp:datagrid with "EO:Grid" control. Gridcell is replaced with '_DateFor0at', when onloss of focus from 'DateTimeColumn'. Following is the code snippet of creating columns dynamically.
Code: C#
string _DateFormat = GetDateFormat();
TimeSpan subDate = new TimeSpan(1, 0, 0, 0);
DatePicker dtPicker = new DatePicker();
dtPicker.PickerFormat = _DateFormat;
dtPicker.PickerHint = _DateFormat;
dtPicker.PopupExpandDirection = ExpandDirection.BottomRight;
dtPicker.Width = 100;
.............
.............
DateTimeColumn calPatentGrantedOn = new DateTimeColumn();
//calPatentGrantedOn.AllowEdit = true;
calPatentGrantedOn.DataFormat = "{0:_DateFormat}";
calPatentGrantedOn.DataField = "GrantedOn";
calPatentGrantedOn.HeaderText = "Granted On";
calPatentGrantedOn.DatePicker = dtPicker;
calPatentGrantedOn.DataType = GridColumnDataType.DateTime;
//calPatentGrantedOn.DatePicker = new DatePicker();
//calPatentGrantedOn.DatePicker.PickerFormat = _DateFormat;
//calPatentGrantedOn.DatePicker.PickerHint = _DateFormat;
//calPatentGrantedOn.DatePicker.Parent.ID = cctlPatentInfoDataGrid;
//calPatentGrantedOn.DatePicker.PopupExpandDirection = ExpandDirection.BottomRight;
calPatentGrantedOn.DatePicker.MaxValidDate = DateTime.Today.Subtract(subDate);
//calPatentGrantedOn.DatePicker.Width = 100;
cctlPatentInfoDataGrid.ColumnTemplates.Add(calPatentGrantedOn);
cctlPatentInfoDataGrid.Columns.Add(calPatentGrantedOn);
cctlPatentInfoDataGrid.Columns[2].Width = 130;
cctlPatentInfoDataGrid.ColumnTemplates[2].Width = 130;
...................
...................
DateTimeColumn patentValidTill = new DateTimeColumn();
//patentValidTill.AllowEdit = true;
patentValidTill.DataFormat = "{0:_DateFormat}";
patentValidTill.DataField = "ValidTill";
patentValidTill.HeaderText = "Valid Till";
patentValidTill.DataType = GridColumnDataType.DateTime;
//patentValidTill.DatePicker = new DatePicker();
patentValidTill.DatePicker = dtPicker;
//patentValidTill.DatePicker.PickerHint = _DateFormat;
//patentValidTill.DatePicker.PopupExpandDirection = ExpandDirection.BottomRight;
//patentValidTill.DatePicker.Width = 100;
cctlPatentInfoDataGrid.ColumnTemplates.Add(patentValidTill);
cctlPatentInfoDataGrid.Columns.Add(patentValidTill);
cctlPatentInfoDataGrid.Columns[4].Width = 130;
cctlPatentInfoDataGrid.ColumnTemplates[4].Width = 130;
I am referring 'Edit Grid Data - Excel Style' example. Thanks, Kumar.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
I am sorry but what is your question?
|
|
Rank: Member Groups: Member
Joined: 9/22/2009 Posts: 24
|
Hi,
First sorry for typo error. I added 'DateTimeColumn' to a EOGrid. Following are the issues i am facing with EOGrid.
1. Picker hint is not showing by default. 2. 'DateTimeColumn' ignoring Max and Min valid date proporties . 3. After selecting the date from the date picker.Selected date si showing properly in the 'DateTimeColumn' cell. But selected date is retaining with '_DateFor0at' on loss of focus from 'DateTimeColumn' cell.
Thanks in Advance, Kumar
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
#1 and #2 appears to be a bug. We will look into it and see what we can do. #3 is your code error. "{0:_DateFormat}" literally format to "_DateFormat". The string literal has nothing to do with your variable _DateFormat.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have fixed #1 and #2. Please let us know if you want to try the new build with the fix.
Thanks!
|
|