![]() |
Column sorting not working in GridView
I have a web page with a few textboxes used for filtering a read-only result
set to a GridView. I am unable to get the ObjectDataSource binding to work as desired insofar as it returns a resultset on page load prior to the filter requests for the query, so I am doing a dynamic binding to the returned DataSet after a call to the business logic layer. It seems to work, but I am unable to sort on the column headings even though I have set the Sort Expression. Is it because of the late binding? My code snippet is as follows: protected void Search_Click(object sender, ImageClickEventArgs e) { string conn = ConfigurationManager.ConnectionStrings["tst"].ConnectionString; TSTBLL bll = new TSTBLL (); TSTBE mt = bll.SubmitQuery(tbJobName.Text, tbOrderDateFrom.Text, tbOrderDateTo.Text, conn); GridView1.DataSource = mt.Test_Table; GridView1.DataBind(); } |
Re: Column sorting not working in GridView
Oops...gave u the wrong link. This is the link with ALL the
information... http://www.learnasp.com/freebook/lea...oDataSourceCon trol.aspx HTH, Kit *** Sent via Developersdex http://www.developersdex.com *** |
Re: Column sorting not working in GridView
This is close... however, my GridView.DataSource is returning as null in the
sorting event. "K B" <kathyburke40@comcast.net> wrote in message news:OOhexLwdGHA.2188@TK2MSFTNGP05.phx.gbl... > Oops...gave u the wrong link. This is the link with ALL the > information... > > http://www.learnasp.com/freebook/lea...oDataSourceCon > trol.aspx > > > HTH, > Kit > > > *** Sent via Developersdex http://www.developersdex.com *** |
| All times are GMT. The time now is 07:13 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.