Rank: Member Groups: Member
Joined: 9/22/2009 Posts: 24
|
Hi, I had created a WebCustomcontrol using "Eo:DatePicker" as "MyCalendarColumn ".I am setting following proprties. picker = new EO.Web.DatePicker(); picker.PickerFormat = _PreferedDateFormat; picker.MinValidDate = _MinDate; picker.MaxValidDate = _MaxDate; picker.EnableViewState = true; picker.CssClass = "EOCalendarStyle"; picker.DayHeaderStyle.CssClass = "EODayHeaderStyle1"; picker.DayHoverStyle.CssText = "background-image:url('00040402');color:#1c7cdc;"; picker.DisabledDayStyle.CssClass ="EODisabledDayStyle1"; picker.DayHeaderStyle.CssClass ="EODayHeaderStyle1"; picker.SelectedDayStyle.CssClass ="EOSelectedDayStyle1"; picker.MonthStyle.CssClass ="EOMonthStyle1"; picker.TitleStyle.CssClass ="EOTitleStyle1"; picker.TitleArrowStyle.CssClass ="EOTitleArrowStyle1"; picker.CalendarStyle.CssClass ="EOCalendarStyle1"; picker.TodayStyle.CssClass ="EOTodayStyle"; picker.ID = controlID; picker.Enabled = _Enabled; container.Controls.Add(picker);Following is code snippet of adding calendar column to grid.
Code: C#
[size=10]
MyTemplateColumn patentGrantedOn = new MyTemplateColumn ();
patentGrantedOn.HeaderTemplate = new MyTextboxColumn(ListItemType.Header, "asfsad");
MyCalendarColumn calPatentGrantedOn = new MyCalendarColumn (ListItemType.Item, "");
calPatentGrantedOn.ControlID = "GrantedOn";
calPatentGrantedOn.MaxValidDate = DateTime.Today;
patentGrantedOn.ItemTemplate = calPatentGrantedOn;
string _DateFormat = GetDateFormat();
calPatentGrantedOn.CalendarControlWidth = 125;
calPatentGrantedOn.PreferedDateFormat = _DateFormat;
patentGrantedOn.ItemStyle.HorizontalAlign = HorizontalAlign.Center;
patentGrantedOn.ItemStyle.Width = 135;
MyDataGrid.Columns.Add(patentGrantedOn);[/size]
I had integrated "MyCalendarColumn " control in "asp:Datagrid" control. I am dynamically creating grid columns.On submission of "Submit" click event. I am getting default date instead of "SelectedDate". I Regards, Kumar.
|
Rank: Member Groups: Member
Joined: 9/22/2009 Posts: 24
|
Hi,
I fixed this issue.Actually earlier, I am setting enableViewState="true" to 'CalendarColumncontrol' and 'asp:Datagrid'. Now I changed the enableViewState="false" in 'asp:datagrid'.
Now on submission of "Submit" click, I am getting the user selected date.
Thanks, Kumar.
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Thanks for the update. Glad it works for you!
|