Hi,

Iam a new comer.Joined today.Would like to clear one of my doubts.

I have a doubt regarding the columns in datagrid.
Iam using vb.net2005 (win application)
I have a typed dataset, with the column names as that of the database(sql) table fields.i had set a datagrid's datasource to this particular typeddataset.
I have added my own column names to the datagrid and i have set the database field property to the corresponding fields in Database tables.
But while it displays, the grid gives me the columns that i have added as well as columns as that of the typed dataset's filed names.and the first set of columns(added ones) are empty and the the columns which bear the typeddataset's column names have values.
What should be done?
Where i went wrong?
I actually need a datagrid which shows the values in the typeddataset with my own column names and not that of the typed dataset's.
Hope iam clear in expressing my doubt.
Anybody knows where i went wrong, please reply as early as possible.It's very urgent.

Recommended Answers

All 2 Replies

Asp.Net AutoGenerateColumns attribute in datagrids is on by default, set the attribute to false in the aspx page. <asp:DataGrid AutoGenerateColumns="False" ...

Thanks it is working

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.