DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: GridView Sort help

  1. #1
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    16

    GridView Sort help

    Hello,
    I have been trying to get this to work now for 2 days and I must be missing something cause I donít think it should be this hard. I have a gridview that I fill without using a datasource. All I want to do is be able to sort the columns however the user wants to. I have been able to find C code that helps but no examples with VB. I have got as far as being able to get to the sub gridView_Sorting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewSortEventArgs) but cant get past this point. Can anyone please give me a hint or send me to a good example on the web.
    Thanks

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    If you're not using a DataSource, how are you populating the GridView?
    Phil Weber
    http://www.philweber.com

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

  3. #3
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    16
    Sorry i do have a datasource I bind to the gridviewwith a select statement that is generated by the users search. What I meant is i do not use the DataSourceID so I cant just select the Enable Sorting check box fron the gridview smart tag

    Thanks

  4. #4
    Join Date
    Dec 2003
    Posts
    2,750
    Not certain if I understand exactly what you're doing but I would take a look at the below articles. The second example provides for bi-directional sorting.

    http://aspnet.4guysfromrolla.com/articles/052202-1.aspx
    http://aspnet.4guysfromrolla.com/articles/012903-1.aspx
    http://aspnet.4guysfromrolla.com/articles/061505-1.aspx
    Paul
    ~~~~
    Microsoft MVP (Visual Basic)

  5. #5
    Join Date
    Mar 2004
    Location
    Canada
    Posts
    16
    Got it working... thanks

Similar Threads

  1. Sort by Date in XSL
    By Nafisa Khan in forum XML
    Replies: 3
    Last Post: 01-24-2011, 04:04 PM
  2. ASP.NET 2.0 GridView nightmare!!!
    By seasider in forum ASP.NET
    Replies: 7
    Last Post: 12-03-2008, 04:03 PM
  3. ASP.NET 2 Textbox value in Gridview row
    By timmym in forum ASP.NET
    Replies: 8
    Last Post: 11-23-2008, 08:31 AM
  4. Instantiating GridView programmatically
    By alphaoide in forum ASP.NET
    Replies: 1
    Last Post: 07-31-2006, 11:07 AM
  5. Re: Sort problem in MS SQL Server 7.0
    By D. Patrick Hoerter in forum Database
    Replies: 1
    Last Post: 06-26-2000, 04:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center