473,320 Members | 1,572 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

LoadingData\DataGrid

gh
I have a datagrid with four columns defined.

First Name Last Name Phone Select(This is a template column)

At runtime I create a datatable and populate it.

aTbl.Columns.Add("First Name", TypeOf(String));
....

Then I add the table to a DataView, which is used for the DataGrids
datasource. The dats shows up in the grid ok, but it adds the coloumns
to the grid to the end of the columns I have already defined. What I
would like to do, if possible, is set the columns up in the designer and
add the data to the columns at runtime. Am I approaching this correctly?

Thanks
Feb 24 '06 #1
1 925
Set datagrid AutoGenerateColumns="False"

HTH

"gh" wrote:
I have a datagrid with four columns defined.

First Name Last Name Phone Select(This is a template column)

At runtime I create a datatable and populate it.

aTbl.Columns.Add("First Name", TypeOf(String));
....

Then I add the table to a DataView, which is used for the DataGrids
datasource. The dats shows up in the grid ok, but it adds the coloumns
to the grid to the end of the columns I have already defined. What I
would like to do, if possible, is set the columns up in the designer and
add the data to the columns at runtime. Am I approaching this correctly?

Thanks

Feb 24 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.