i use rjs calendar in my EditItemTemplate in Grid view without Atlas. This works fine but when i use atlas in my page then rjs Calender in EditItemTemplate CSS and image are not include.
If i use atlas in rjs calendar in my page rather than EditItemTemplate then it work fine. More ever if i use this rjs PopCalendar in EditItemTemplate and include this in another portion of the page rather then EditItemTemplate then rjs PopCalendar in EditItemTemplate also works fine.
I think if a page has only one rjs PopCalendar and we use this in EditItemTemplate of Grid View then CSS and image are not load.
Can any one help me.
Thanks in advance
The issue is that the client side script for components (like dhmtl popup calendars and in my case a custom textbox that formats its contents onblur) call Page.ClientScript.RegisterClientScriptBlock in their initialization. These controls are set up to only register the script once regardless of how many of the controls you have on the page. So when you drop one of these client-enabled controls on the page outside of the update panel the script will be registered as usual with no problems. If they are embedded in a template like the edit item template the control won't be created until postback and because you are doing a partial page update the call to Page.ClientScript.RegisterClientScriptBlock is failing to register the required scripting components. If you open the Error Console in firefox you'll see the javascript failing...
A quick fix is to drop an instance of the control you want to use outside the update panel and hide it...on page load the script will be registered and the control should function as usual. This is a hack and I'm currently searching (this forum and the web) for a better solution...I definitely don't want to include javascript via script tags in the markup...kinda defeats the purpose of encapsulating the script in the source for the control...
~JDS
0 件のコメント:
コメントを投稿