Welcome Guest Search | Active Topics | Sign In | Register

EnableViewState not working DatePicker Options
bskumar
Posted: Wednesday, October 21, 2009 2:47:37 AM
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.
bskumar
Posted: Wednesday, October 21, 2009 5:20:55 AM
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.
eo_support
Posted: Wednesday, October 21, 2009 9:05:01 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Thanks for the update. Glad it works for you!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.