Click here to Skip to main content
15,892,746 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how Can I add combo box cell for all row when I set dataset to data grid view ;
...I wrote this code but it does n't work:datagridview.DataSource = ds;
datagridview.DataMember = "selectE";
DataGridViewComboBoxCell cell = new DataGridViewComboBoxCell();
for (int i = 0; i < ds.Tables["Post"].Rows.Count; i++)
{
cell.Items.Add(ds.Tables["Post"].Rows[i][0].ToString());
}
for (int j = 0; j < ds.Tables["selectE"].Rows.Count; j++)
{ datagrid_Name181[0,j] = cell;
}
Posted

1 solution

 
Share this answer
 
Comments
raheleh_es 22-Oct-11 1:53am    
In this code one cell in colum change I want chang all cell in one colum
Can you Help me

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