T
Thirsty Traveler
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();
}
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();
}