Unbound Datagridview

Momo

Member
Joined
May 30, 2006
Messages
21
Programming Experience
Beginner
Anybody exprienced that create a datagrid in the view of, let says there are 3 rows. The 1st row is containing the name (means instead of putting the name at the column header), I put in row cell. but, the 2nd column in each row is the different type of column property. Say that Column in row 1 and 2 is DataGridViewTextBoxColumn but column type of 3rd row in the datagrid is DatagridviewComboBoxColumn. I would likes ask can I achieve this? And could somebody share how i going to achieve this concept. Thank you in advance.
 
Youre using .NET 2.0
Open the dataset designer and make a datatable that is reasonably representative of what you want to display.
Bind it at design time to the DGV, and use the visual designer to design the grid..

Then just fill the datatable and the grid will populate. I see nothing in your question that requires an unbound grid..


However, if your grid *must* be unbound for reasons not stated, then you can take the code that the designer generates after you design the grid visually.. copy and paste it somewhere nice and relevant (like form load) and then rip out the bindings again. This way you get the computer to write the code for you
 
Back
Top