Hi,
I have a web application that uses a custom http handler. I have a gridview which displays data using custom paging and sorting. In grid view's pageindexchanging and sorting events, I'm redirecting the page to the custom http handler and the required paging and sorting would be done.
Now I want to provide paging and sorting with AJAX fuctionality without bypassing the custom http handler. How can I achieve this? Does ASP.Net AJAX update panel help?
Any help regarding this is appeciated.
Thanks Bayu,
That's a good one. However in my case, I'm considering to use the Grid itself. Is there a way to acheive the AJAX functionality with the Grid without bypassing custom http handler?
Regards,
Som.
Hi Bayu,
Nice ideas. I would like to bring to your notice a couple of things:
a. I'm not using the default paging of the GridView.
b. I have implemented Custom Paging with the help of CslaDataSource control. I'm using CSLA.Net version 2.1.3
AJAX functionality is working fine with the GridView if I use the update panel. However, at present I'm able to do so bypassing the custom HttpHandler.
The problem is with calling the custom HttpHander asynchronously. At present, I'm using a Response.Redirect to call the custom HttpHandler. This will result in a page redirection.
Is there a workaround to this so that I call the custom HttpHandler asynchronously whenever any event is triggered?
Can this be done like the following:
a. Use the ASP.Net AJAX update panel and add the GridView in the ContentTemplate.
b. Add paging and sorting events of the GridView to the triggers list of update panel
c. Send a request through HttpWebRequest and get the response using HttpWebResponse in those events.
d. Bind the data to the CslaDataSource after getting the response back
Please let me know if I'm wrong.
Regards,
Som.
somayajulu:Nice ideas. I would like to bring to your notice a couple of things:
a. I'm not using the default paging of the GridView.
b. I have implemented Custom Paging with the help of CslaDataSource control. I'm using CSLA.Net version 2.1.3AJAX functionality is working fine with the GridView if I use the update panel. However, at present I'm able to do so bypassing the custom HttpHandler.
Ah, good that you have it working already!
I didn't understand that from your earlier posts. So I guess my previous post is a bit off-track. ;-)
somayajulu:
The problem is with calling the custom HttpHander asynchronously. At present, I'm using a Response.Redirect to call the custom HttpHandler. This will result in a page redirection.
Is there a workaround to this so that I call the custom HttpHandler asynchronously whenever any event is triggered?
Right, so that's the problem.
By making use of the UpdatePanel you saved yourself a whole bunch of work you would have to do otherwise, as you simply plugged-in a full block of off-the-shelf AJAX logic. All this is fine, but now that you want to modify some part of the behavior you get stuck because as far as I know there is no clean way to get behind the scenes of this UpdatePanel. This again relates to my uneasiness with this stuff from MS as I prefer to get into all the nasty details, especially with this kind of cutting-edge technology that is so sensitive to the used browser and platform.
Anyways, I am a afraid I can't offer you a solution here.This UpdatePanel is one huge black-boxed piece of AJAX logic that implements the befamed 'adaptive rendering logic', and I don't know of a straightforward way to hook into this without causing more pain than providing cure.
somayajulu:
Can this be done like the following:
a. Use the ASP.Net AJAX update panel and add the GridView in the ContentTemplate.
b. Add paging and sorting events of the GridView to the triggers list of update panel
c. Send a request through HttpWebRequest and get the response using HttpWebResponse in those events.
d. Bind the data to the CslaDataSource after getting the response back
Copyright (c) Marimer LLC