How to new added column in the fist column

A

ad

I added column to a DataTable, I want the column to be display in the first
place of a dataGrid.
The Column in dataGird is auto-generate.
How can I do that?
 
T

Tod Birdsall

Hi ad,

I don't believe there is a way to insert a column into a specific place
in the DataTable. If for some reason you are not able to set the order
of the DataGrid, the other option would be to change the order of the
columns retrieved via the query you are using to retrieve the data.

Hope this helps.

Tod Birdsall, MCSD for .Net
http://tod1d.blogspot.com

Help me get free Sony PSP and get one for yourself:
http://tinyurl.com/8n4hg
 
E

Eliyahu Goldin

Don't use autogenerate and you will see how much more control you have.

Eliyahu
 
A

Alex Smith

Hi
You can try with
<asp:DataGrid ID="ItemsGrid" Runat="Server" CssClass="label">

<Columns>

<asp:TemplateColumn HeaderText="Select">

<ItemTemplate>

<asp:CheckBox ID="SelectCheckBox" Runat="Server" Checked="false" />

</ItemTemplate>

</asp:TemplateColumn>

</Columns>

</asp:DataGrid>



Alex.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top