Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am having grid view with page size 20 and my data is sorting whole grid view record
but i want the record should sort by page wise
for e.g if page 1 contains a,b,c,d records and page 2 contains e,f,g,h
than while sorting of page 2 only record should sort e,f,g,h and should not sort the record of 1st page a,b,c,d
Posted
Updated 4-May-14 20:40pm
v2

VB
<asp:GridView ID=" productsGridView" Runat="server"
        DataSourceID="productDataSource" AutoGenerateColumns="False"
           AllowSorting="True" BorderWidth="2px" BackColor="White"
           GridLines="None" CellPadding="3"
           CellSpacing="1" BorderStyle="Ridge" BorderColor="White"
           AllowPaging="True">



ie, AllowSorting=True
 
Share this answer
 
Comments
Member 10495127 5-May-14 2:20am    
please give another solution
I am having grid view with page size 20 and my data is sorting whole grid view record
but i want the record should sort by page wise
for e.g if page 1 contains a,b,c,d records and page 2 contains e,f,g,h
than while sorting of page 2 only record should sort e,f,g,h and should not sort the record of 1st page a,b,c,d
Set the proprty of grid view AllowSorting to true
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900