PDA

View Full Version : [CLOSED] Remote paging/sorting/filtering on SQLDataSource for GridPanel



jchau
Oct 28, 2008, 8:06 PM
Is there an example of remote sorting, filtering, and paging with an SQLDataSource? I have a fairly large table that I want user to have ability to view. I looked at the various GridPanel examples in Examples Explorer, but the only remote Filtering example is based on objects.

Vladimir
Oct 28, 2008, 8:20 PM
Hi jchau,

http://examples1.ext.net/#/GridPanel/DataSource_Controls/Paging_and_Sorting/

it is example with ObjectDataSource but you can easly convert it to SqlDataSource

aswad32
Oct 31, 2008, 7:50 AM
just want to know how exactly the gridpanel put default value for sort and dir parameter. here's the problem, i convert the gridpanel sorting and paging code to VB.NET (code behind) and the other things are exactly the same. but when i run it, on first load there is no data, when i sort it then the data load properly. i do debugging and see during the first load sort parameter always return nothing. and also based on the example, you never set the default value for sort and dir parameter. so anythings i missing here?

Vladimir
Oct 31, 2008, 7:58 AM
Hi aswad32,

This example does not require sort and dir for retrieve data (if sort and dir are absent then unsorted data return). It seems that your business logic requires these parameters. You can set default sort and dir in Store



<SortInfo Field="LastName" Direction="ASC" />


or in AutoLoadParams of store



<AutoLoadParams>
<ext:Parameter Name="sort" Value="LastName" />
<ext:Parameter Name="dir" Value="ASC" />
</AutoLoadParams>

aswad32
Oct 31, 2008, 8:10 AM
 yosh, one problem solved, in autoloadparam previously i put s'thing like this

<AutoLoadParams>

<ext:Parameter Name="sort" Value="={'LastName'}" />
<ext:Parameter Name="dir" Value="={'ASC'}" />
</AutoLoadParams>


thanks for showing me the right way...

geoffrey.mcgill
Oct 31, 2008, 8:21 AM
Hi aswad32,

You shouldn't require the ={''} token wrapper around the Value properties. The following code sample should reproduce the exact same result.

Example


<AutoLoadParams>
<ext:Parameter Name="sort" Value="LastName" />
<ext:Parameter Name="dir" Value="ASC" />
</AutoLoadParams>

Hope this helps.

emover
Nov 03, 2012, 11:48 PM
Hi jchau,

http://examples1.ext.net/#/GridPanel/DataSource_Controls/Paging_and_Sorting/

it is example with ObjectDataSource but you can easly convert it to SqlDataSource

Hi Vladimir,
http://examples1.ext.net/#/GridPanel/DataSource_Controls/Paging_and_Sorting/
link doesn't work for some reason
Thank You