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

RadDatePicker gets distorted on visibility change after postback

1 Answer 123 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Neha
Top achievements
Rank 1
Neha asked on 03 Apr 2012, 10:46 AM
In my application I am using 2 RadDatePickers for selecting a range of Date. They are present inside a Div container.
These date pickers are using a shared RadCalendar and RadAjaxManager.
I have radio buttons that control the visibilty of the DatePickers.
A button which performs some action and causes a complete postback.

Everything shows fine when i load the page for the first time. 
 
Inline image 3

Then i hide the Div containing the DatePickers on click of one of the radio buttons using:

DivFromDate.Visibility  = false;
DivToDate.Visibility = false;

Then i click on the button which causes a complete postback.

My problem is when i show the Div again containing the DatePickers, on click of the last radio button using:

DivFromDate.Visibility  = true;
DivToDate.Visibility = true;

the UI of the RadDatePicker gets distorted.

Inline image 4

Any help would be appreciated.

Thanks,
Neha 

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 06 Apr 2012, 01:48 PM
Hello Neha,

I suppose you want to call a postback on all your controls with a button. However, in this case the updated controls are ajaxified therefore the erratic behavior which arises is expected.
In order to cause your button to update your ajaxified controls, please do the following:
  • add a panel to contain all controls you wish to update on button-click postback
  • configure your RadAjaxManager settings so:
    • the panel updates itself
    • the button updates the panel
I have attached a sample project where these steps are done.

All the best,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Calendar
Asked by
Neha
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or