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

One more demo wanted

7 Answers 72 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
miksh
Top achievements
Rank 1
Iron
miksh asked on 18 Dec 2008, 10:30 PM
We have two pretty good demos displaying partial ajaxification (http://demos.telerik.com/aspnet-ajax/Ajax/Examples/Manager/PartialAjaxification/DefaultCS.aspx) and partial post-backs (http://demos.telerik.com/aspnet-ajax/Ajax/Examples/Manager/PartialPostBacks/DefaultCS.aspx).

Could you give me example (ideally to add another demo) how to implement the same UI with complete ajaxification where
1. the grid pager will update the whole grid
2. the details button will update the details data only

Thanks

7 Answers, 1 is accepted

Sort by
0
Iana Tsolova
Telerik team
answered on 20 Dec 2008, 02:43 PM
Hello miksh,

You can use the demo for Partial ajaxification as bases for implementing your scenario. In addition to it you can handle the OnCommand and add ajax request manually when paging:

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">  
<script type="text/javascript">  
function onCommand(sender, eventArgs)  
{  
    if(eventArgs.get_commandName() == "Page")  
    {  
        $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest("Paging");  
    }  
}  
</script>  
</telerik:RadCodeBlock> 
<ClientSettings> 
    <ClientEvents OnCommand="onCommand" /> 
</ClientSettings> 

Let me know if this helps.

Sincerely yours,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
miksh
Top achievements
Rank 1
Iron
answered on 22 Dec 2008, 04:25 PM
Thanks, this helped. The only issue I found is when I use
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest" > 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="lp1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
        </telerik:RadAjaxManager> 

the loading panel is not displayed. It was fine when I used AjaxControlID="RadGrid1"
0
Iana Tsolova
Telerik team
answered on 23 Dec 2008, 10:54 AM
Hello miksh,

Yes, you are right. I forgot to mention that you need to set up the ajax manager to update the grid in the ajax manager settings. Then you can handle the invoked ajax request in the AjaxRequest server event of the manager.

Kind regards,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
miksh
Top achievements
Rank 1
Iron
answered on 23 Dec 2008, 01:50 PM
I did mention it in the link  add ajax request manually.
But my question was why using this approach  the loading indicator does NOT appear? Do you have any example that a loading indicator works fine if the ajax request initiator is RadAjaxManager?
In my test project the ajax initiator was RadGrid and the loading indicator worked fine:
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest" > 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadGrid1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="lp1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
        </telerik:RadAjaxManager> 

Then I changed it to:
        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest" > 
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="lp1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
        </telerik:RadAjaxManager> 
and loading indicator doesn't appear during the ajax update.
0
Iana Tsolova
Telerik team
answered on 23 Dec 2008, 03:25 PM
Hi miksh,

In fact you need both settings:

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest" >    
    <AjaxSettings>    
        <telerik:AjaxSetting AjaxControlID="RadGrid1">    
            <UpdatedControls>    
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="lp1" />    
            </UpdatedControls>    
        </telerik:AjaxSetting>   
        <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">    
            <UpdatedControls>    
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="lp1" />    
            </UpdatedControls>    
        </telerik:AjaxSetting>    
    </AjaxSettings>    
</telerik:RadAjaxManager>   

Thus the loading panel should apper properly on each ajax request.

All the best,
Iana
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
miksh
Top achievements
Rank 1
Iron
answered on 23 Dec 2008, 08:46 PM
Hmm... so you admit that a loadingpanel does NOT appear if the the ajax initiator is RadAjaxManager? Please confirm.

The solution you suggested does NOT work as well. The loading indicator appears only when I remove javascript call $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest("Paging");

Besides, even if your suggestion would fix the loading indicator issue it would break the logic not to update the whole grid when a row button is clicked.
Once again, read my first post to understand what I try to achieve. If you prefer I can open a support ticket.
0
Vlad
Telerik team
answered on 30 Dec 2008, 08:37 AM
Hello,

I've made for you small demo to illustrate you how to achieve your goal. You can find the application attached.

Greetings,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
miksh
Top achievements
Rank 1
Iron
Answers by
Iana Tsolova
Telerik team
miksh
Top achievements
Rank 1
Iron
Vlad
Telerik team
Share this question
or