Dear Freinds
i face a problem in show the data from datagridview

actually i make a 4 column in datagridview now i want the four columns of table come in same columns in datagridview but when i show data in gridview it add more 4 columns and show data in those 4 column

Dear Freinds
i face a problem in show the data from datagridview

actually i make a 4 column in datagridview now i want the four columns of table come in same columns in datagridview but when i show data in gridview it add more 4 columns and show data in those 4 column

did you make the column in the datagridview manually? because if you want to show the four columns in a datagridview, you don't have to manually make columns, just bind the datagridview it your datasource and it will automatically create columns for you..
but...
but if you really want to put the data from the four columns to the other four columns that you already made in the datagridview, you should insert it.. use insert statements..
hope this could help...

Dear Freinds
i face a problem in show the data from datagridview

actually i make a 4 column in datagridview now i want the four columns of table come in same columns in datagridview but when i show data in gridview it add more 4 columns and show data in those 4 column

Hi!

>>>> i want the four columns of table come in same columns in datagridview

Can you please elaborate it ???

you need to post the code through which you populate the datagridView, so that we could check that why this is happening.

yr in simple words i want that sql show the data in already made columns in datagird in form level

I think you have created some columns manually and then binding source to the datagridview. so, you can add this line before binding: (which will clear datagridview first then bind the columns which are needed)

dataGridView1.Columns.Clear(); 
// Now Bind DataGridview
dataGridView1.DataSource = SomeTable_OR_SomeBindingSource;
This article has been dead for over six months. Start a new discussion instead.