Question : GridView Sorting

Hi,

I am using SqlDataSource to bind data to Gridview....

i am forced to determined the query only dynamically..

so it is all done programatically...

I am having in issue with implementing a handler for sorting..

Can someone help me with a handler that works with SqlDataSource as the DataSource for GridView....

Also how can we get a DataTable from SqlDataSource

Answer : GridView Sorting

Hi Ganesh,

works now....in case someone wants to a helping hand.....

 SqlDataSource  ds= (SqlDataSource)  gv_RevenueReport.DataSource;
       DataView view = (DataView)ds.Select(new DataSourceSelectArguments());

                   view.Sort = e.SortExpression + " " +" DESC";

                   gv_RevenueReport.DataSource = view;
                   gv_RevenueReport.DataBind();



Random Solutions  
 
programming4us programming4us