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

Ajaxify How-To

2 Answers 80 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Felipe Saldana
Top achievements
Rank 1
Felipe Saldana asked on 03 Feb 2009, 01:40 AM

It seems like I keep running into problems when I Ajaxify controls.

Does someone have some concrete examples and how-to's on how to use Ajaxify controls correctly?

The current problem I am having is that I have the following

 
                <telerik:AjaxSetting AjaxControlID="gvMessageList">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="gvMessageList" LoadingPanelID="ajaxLoadingPanel" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                  
                <telerik:AjaxSetting AjaxControlID="ddlProperty" EventName="OnSelectedIndexChanged">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="gvMessageList" LoadingPanelID="ajaxLoadingPanel" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
 
                <telerik:AjaxSetting AjaxControlID="btnSearch">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="gvMessageList" LoadingPanelID="ajaxLoadingPanel" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
                  
                <telerik:AjaxSetting AjaxControlID="messagePanel">  
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="lblPropertySmsText" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 

To me it should be straight forward: gvMessageList is a RadGrid and it should be updated when 
    - it does something itself (pages, sort, etc)
    - when the drop down list is changed 
    - when a search button is clicked

For some reason AFTER I use the drop down list to make a selection problems occur.  If I click the search button (or expand the grid) the SelectedIndexChanged event for the drop down list fires AS WELL AS the event for the button.

Can someone explain what I am missing on how to Ajaxify correctly?

Thanks.

2 Answers, 1 is accepted

Sort by
0
Felipe Saldana
Top achievements
Rank 1
answered on 03 Feb 2009, 04:54 PM
I think I figured this out.

I was re-binding the drop down list on every postback.


Thanks.
0
Accepted
KlimUser
Top achievements
Rank 2
answered on 03 Feb 2009, 11:34 PM
Yes, that's a common mistake when We start with AjaxManager
I passed for the same the first time I used AjaxManager
And It's great you discover this by yourself 'cause here in the forum can't help you without the complete code to watch this =$
congrats!! ;-)
C'ya!!
Tags
Ajax
Asked by
Felipe Saldana
Top achievements
Rank 1
Answers by
Felipe Saldana
Top achievements
Rank 1
KlimUser
Top achievements
Rank 2
Share this question
or