Re: reorder columns in a gridview
Changing the order of the sql statement won't work. These columns that I
want to reorder are added after data is retrieved from sql. Depending on
what the user wants to do, they may be adding columns to the gridview after
the original query, usually from an excel spreadsheet. Some of these
columns we want to be moved to be the first column. Right now I am doing a
dt.columns.add("newCol"). So is there a way to reorder columns, or a way to
add the column to be in a certain position in the first place?
Chenhong, I don't understand what you mean, "move the column in the
gridview". That is what I want to do, but how? Do you have a syntax
example?
Thanks so much for your help.
"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.
>
Date:Thu, 2 Aug 2007 08:06:35 -0600
Author:
|