question about sorting field in gridview and ajax

C

CH.

Hi,

i read a lot of ajax stuff and i was asking myself this:
when clicking on the fieldname in a gridview (sorting enabled), the whole
database is sorted according to that field.
Is the whole html- page refreshed when doing that or only the data in the
gridview, and in that last case, can we say ajax is used? If not, why is
ajax not implelented (by default) in the sorting /updating actions?

Thanks
Ch
 
S

ShepherdWeb

You can enable this declaratively by setting
EnableSortingAndPagingCallbacks="true" in your GridView. You don't
even need AJAX to do this.
 
S

ShepherdWeb

Thanks Mark, I did not know that. My preferred method of databinding
is using the declarative method.
 
C

CH.

Marc,

I did EnableSortingAndPagingCallbacks="true" in my GridView and in order to
test whether the whole page is refreshed or not, i added in the aspx file
those lines:
<script language="javascript" type="text/javascript">
da= new Date()
trm=dal.getMinutes()
trs=da.getSeconds()
document.write(trm + " " + trs)
</script>

When EnableSortingAndPagingCallbacks="true" then on both cases (sorting or
paging), the time remains the same.
When "false", in both cases the time is different.

May i conclude that EnableSortingAndPagingCallback="true" is working in both
cases (page is not refreshed)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,588
Members
45,093
Latest member
Vinaykumarnevatia00

Latest Threads

Top