GridView Sort (Top Urgent )
hi all,
I have a big problem to sort my GRID VIEW.
First Quection
im sorting it in GridView sorting event. I have to sort 3 coloumns.(Bank Name,Agent & Country).
This is my Sorting code.....-->
" Buyer bindBuyer = new Buyer();
DataSet dsBuyer = bindBuyer.BindBuyerDetails();
DataView dvBuyer = new DataView(dsBuyer.Tables[0]);
dvBuyer.Sort = "BankName,Country,Agent ASC";
GridView1.DataSource = dvBuyer;
GridView1.DataBind();
i clicked on grid ANY sort link button(Bank Name,Agent or Country sort link button) , every time its sorting my Bank Coloumn. not sorting Country or Agent.
Second Quection
i check my second grid view page after sorting (I mean page index).. but that coloumn not sorted above page. .
This is my page index changing event code
GridView1.PageIndex = e.NewPageIndex;
Buyer bindBuyer = new Buyer();
DataSet dsBuyer = bindBuyer.BindBuyerDetails();
DataView dvBuyer = new DataView(dsBuyer.Tables[0]);
dvBuyer.Sort = "BankName,Country,Agent ASC";
GridView1.DataSource = dvBuyer;
GridView1.DataBind();
Can u help me to sort that grid view.
MSB
__________________
MSB
|