Results 1 to 3 of 3

Thread: Sorting in datagrid?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    top of the mountain
    Posts
    234

    Sorting in datagrid?

    Hi everybody,
    how to sort datagrid when AutoGenerateColumns is set to false?
    When AutoGenerateColumns=true then sort is easy (column header is hyperlink and can click on it, only you need to do is to write sort function), but when AutoGenerateColumns=false and I create columns
    VB Code:
    1. <Columns>
    2.     <asp:BoundColumn DataField="trans"    
    3.                          HeaderText="Trans #" />
    4.     <asp:BoundColumn DataField="date"
    5.                          HeaderText="Trans date"/>
    6.                 <asp:BoundColumn DataField="amount"
    7.                          HeaderText="Amount" />
    8. </Columns>
    then column header isn't hyperlink and can't click on it.
    How to sort datagrid in that case?

    regard j

  2. #2
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Fort Collins, CO
    Posts
    366

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Aug 2002
    Location
    top of the mountain
    Posts
    234
    Yea, that's it.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width