Just to help clarify here's a snippet from the problem code:
protected override void Render(HtmlTextWriter writer)
{
DataView dv = new DataView(_ds.Tables[0]);
_gv = new GridView();
_gv.AllowSorting = true;
_gv.DataSource = dv;
_gv.DataBind();
_gv.RenderControl(writer);
}
When I use this code no matter what properties I seem to set I can not get
the sort hyperlinks in the header row to show up. If I declaratively create a
GridView control it works fine. It's only if I dynamically create the control
as I've done above that I have the problem.
Ideas?
"Don" wrote:
In my code I'm dynamically creating a GridView control and binding it to a
DataView object that I create form a DataSet that I get from a web service
call. It seems that no matter what I do I can not get the sort hyperlinks in
the header row to show up. I've set AllowSorting to true and various other
things but no matter what I do I can't get them to show up. Does sorting only
work with the new SqlDataSource and related objects in ASP.NET 2.0 and not
data sources like the DataView object.
Thanks