reorder columns in a gridview

Discussion in 'ASP .Net' started by eagle, Jul 28, 2007.

  1. eagle

    eagle Guest

    How can I reorder the columns in a gridview. The gridview is autogenerated,
    and in a windows application I can use gv.columns("Client').DisplayIndex=0
    but in an asp page I get an errors that says DisplayIndex is not a member.
    How can I do this? Thanks for your help.
     
    eagle, Jul 28, 2007
    #1
    1. Advertisements

  2. eagle

    chenhong Guest

    in the autogenerated aspx code, move the column in the gridview.
    the order of the columns in the aspx code will affect the order of the
    display

    "eagle" <> дÈëÏûÏ¢ÐÂÎÅ:...
    > How can I reorder the columns in a gridview. The gridview is
    > autogenerated, and in a windows application I can use
    > gv.columns("Client').DisplayIndex=0 but in an asp page I get an errors
    > that says DisplayIndex is not a member. How can I do this? Thanks for
    > your help.
    >
     
    chenhong, Jul 29, 2007
    #2
    1. Advertisements

  3. Change column order in the sql statement that gets the data.

    --
    Eliyahu Goldin,
    Software Developer
    Microsoft MVP [ASP.NET]
    http://msmvps.com/blogs/egoldin
    http://usableasp.net


    "eagle" <> wrote in message
    news:...
    > How can I reorder the columns in a gridview. The gridview is
    > autogenerated, and in a windows application I can use
    > gv.columns("Client').DisplayIndex=0 but in an asp page I get an errors
    > that says DisplayIndex is not a member. How can I do this? Thanks for
    > your help.
    >
     
    Eliyahu Goldin, Jul 29, 2007
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shapper

    Is it possible to reorder a dataset?

    Shapper, Jun 19, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    725
    Brock Allen
    Jun 19, 2005
  2. farseer
    Replies:
    1
    Views:
    2,933
    farseer
    Jun 28, 2005
  3. K B
    Replies:
    0
    Views:
    526
  4. =?Utf-8?B?RGFya28gS29ucmFk?=

    GridView reorder Columns

    =?Utf-8?B?RGFya28gS29ucmFk?=, Aug 7, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    932
    =?Utf-8?B?RGFya28gS29ucmFk?=
    Aug 7, 2006
  5. Kyle K.

    GridView reorder problems

    Kyle K., Oct 4, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    912
    Kyle K.
    Oct 4, 2006
  6. Jacksm
    Replies:
    2
    Views:
    1,099
    Paul Chalekian
    Nov 21, 2006
  7. JohnE

    reorder list

    JohnE, Feb 6, 2010, in forum: ASP .Net
    Replies:
    2
    Views:
    870
    JohnE
    Feb 6, 2010
  8. Vinki

    template columns and bound columns in gridview

    Vinki, Apr 25, 2007, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    1,126
    Vinki
    Apr 25, 2007
Loading...