Welcome Guest Search | Active Topics | Sign In | Register

CallbackPanel control Options
Venkat
Posted: Wednesday, January 9, 2008 12:02:01 PM
Rank: Member
Groups: Member

Joined: 9/28/2007
Posts: 20
Hi,

I have created a user control using your datepicker control and registered that control in one of my page say default.aspx. In my default.aspx page, I have put my user control within a callback panel. My user control has 2 datepicker controls. In the usercontrol I have also set the EnableViewState="true" and OnSelectionChanged="dpBegindate_SelectionChanged" so that onselection change of the date, the event gets triggered. But, unfortunately, on any change of the date, this event is not getting triggered. Given below is my code of default.aspx
Any reason why this event is not getting triggered. Also, a solution to this issue would be great.

Code: HTML/ASPX
<eo:CallbackPanel ID="pnlDate" runat="server" Triggers="{ControlID:dpDate}">
     <table>
            <tr>
               <td colspan="2">
                                               
                      <PDR:Calendar id="dpDate" runat="server" bdText="*Invoice Begin Date :" edText="*Invoice End Date :">
                      </PDR:Calendar>
                                    
                 </td>
            </tr>
    </table>
</eo:CallbackPanel>
eo_support
Posted: Wednesday, January 9, 2008 4:50:05 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Check the DatePicker's AutoPostBackOnSelect property. The CallbackPanel does not automatically turn on a control's server event. It only takes whatever that was already hapening and converts it to AJAX call.
Venkat
Posted: Thursday, January 10, 2008 8:53:13 AM
Rank: Member
Groups: Member

Joined: 9/28/2007
Posts: 20
As per your suggestion, I checked the DatePicket's AutoPostBackOnSelect property and it triggered the server side event and it worked fine. However, after setting this property the ClientSideOnSelect property stopped functioning(meaning it is not getting called). If I remove the AutoPostBackOnSelect property then ClientSideOnSelect is working fine. I need to perform some validation on client side before executing the server side events. Could Pls tell me if I am doing something wrong or is that how the DatePicker control function. My assumption was the sequence of the trigger would be ClientSideOnSelect will be triggered first and then the server side OnSelectionChanged will trigger. Pls guide me.
Code: HTML/ASPX
<eo:DatePicker runat="server" id="dpBegindate" DayHeaderFormat="FirstLetter" TitleFormat="MMMM, yyyy"   
				TitleLeftArrowImageUrl="DefaultSubMenuIconRTL" DayCellHeight="15" OtherMonthDayVisible="True"
				DayCellWidth="31"  TitleRightArrowImageUrl="DefaultSubMenuIcon" TitleTemplateScope="TextOnly"  
				 ClientSideOnSelect="ValidateDates" AutoPostbackOnSelect ="true"
				PickerHint="dd/mm/yyyy" PickerFormat="dd/MM/yyyy" ToolTip="dd/mm/yyyy" 
				OnSelectionChanged="dpBegindate_SelectionChanged" >
eo_support
Posted: Thursday, January 10, 2008 6:07:44 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,217
Hi,

The key to understand CallbackPanel is that CallbackPanel works transparently. In another word, it works as if it didn't exist. So if you see a problem, first try to determine whether it works the same without the CallbackPanel. If it does, then it has nothing to do with the CallbackPanel.

Once you take the CallbackPanel out, it goes back to the DatePicker. DatePicker either raises client side event or server side event. So if you have AutoPostBackOnSelect set to true, ClientSideOnSelect won't work. This behavior is by design.

Validation needs to be done by validators. It has nothing to do with either DatePicker or CallbackPanel.

Thanks


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.