how to allow sorting in Grid view that is populated dynamically at the server side

XOXO

New Member
i have a grid view that i populate dynamically. every time with a new query depends on the user selection. every thing is working fine except the sorting which i cant add to my grid view at the server side. \[code\]if (TreeView1.SelectedNode.Value =http://stackoverflow.com/questions/13698254/="40"){ OracleDataAdapter da = new OracleDataAdapter(" Select col1,col2 FROM tablename"); DataSet dsBG_data = http://stackoverflow.com/questions/13698254/new DataSet(); da.Fill(dsBG_data); dsBG_data.Tables[0].Columns[0].ColumnName ="PO Number"; dsBG_data.Tables[0].Columns[1].ColumnName = "Line Number"; if (dsBG_data.Tables[0].Rows.Count <= 0) dsBG_data.Tables[0].Rows.Add("", ""); GV_BG_Data.DataSource = dsBG_data; GV_BG_Data.DataBind();}\[/code\]
 
Back
Top