Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Sort Hyperlinks Not Showing Up (ASP.NET 2.0)

Reply
Thread Tools

Sort Hyperlinks Not Showing Up (ASP.NET 2.0)

 
 
=?Utf-8?B?RG9u?=
Guest
Posts: n/a
 
      10-12-2005
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RG9u?=
Guest
Posts: n/a
 
      10-13-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Sort Hyperlinks Not Showing Up (Grid View 2.0) mattronchetto@gmail.com ASP .Net 1 07-03-2006 09:23 PM
ASP 1.1: DataGrid - Showing/Not Showing Buttons Ray Booysen ASP .Net 2 03-28-2006 02:49 PM
Array sort function sorts on chars not numbers ... help ! how to sort numbers GIMME Javascript 5 07-26-2004 01:28 AM
Ado sort error-Ado Sort -Relate, Compute By, or Sort operations cannot be done on column(s) whose key length is unknown or exceeds 10 KB. Navin ASP General 1 09-09-2003 07:16 AM
Re: DataGrid Header Sort Hyperlinks Jay ASP .Net 0 08-30-2003 12:53 PM



Advertisments