Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,
i have a datagridview in columns are generated at design time. i want to bind it with binding navigator. But the problem is columns get doubled i.e columns of design time plus columns after binding. I just want to bind datagridview column with columns of bindingsource i.e

column[0] of datagridview=column[0] of bindingsourse
column[1] of datagridview=column[2] of bindingsourse
column[2] of datagridview=column[3] of bindingsourse

Thank you
Posted
Comments
Winston Madiano 1-Aug-13 3:05am    
Set datagridview property "AutogenereateColums" to false

1 solution

Never Mind, I solved it with the next code

private void LoadData()
{
dataGridView1.DataSource = null;
TTT3Dal awdal = new TTT3Dal();
DataSet dsAWIA = awdal.getDataSet("select_tbl");
awdal.dsTTT3 = dsAWIA;

BindingNavigator _bindnav = new BindingNavigator(true);
bindingSource1.DataSource = dsAWIA;
bindingNavigator1.BindingSource = bindingSource1;

dataGridView1.DataSource = bindingSource1;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900