Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi..
my question is how can i add combo box instead of textbox in datagrid
i.e.(System.Windows.Fowms.Datarid)?
i am using it for invoice bill, so i have to add combobox so that i can bind value to it..
but its going too much difficult to add.
Please help me to solve.
Thanks in advance.
Posted
Comments
Sergey Alexandrovich Kryukov 2-Apr-13 1:42am    
Please tag it: Forms.
—SA
Sergey Alexandrovich Kryukov 2-Apr-13 1:42am    
Only one, or whole column?
—SA
Member 9953256 2-Apr-13 1:52am    
only one column i want combobx and rest all must be textbox
Member 9953256 2-Apr-13 1:54am    
I want about DataGrid not DataGridView...
System.Windows.Fowms.DataGrid
i knw about DataGridView But I didnt use DataGrid..
Sergey Alexandrovich Kryukov 2-Apr-13 1:58am    
I asked it this is the whole column (same type in a column or not).
Anyway, I answered on how to do it, please see.
—SA

If this is a whole column, please see: http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcolumn.aspx[^].

For an individual cell, you can create a cell instance of appropriate type:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcomboboxcell.aspx[^].

Then you need to replace some cell of a grid view with a newly created cell.

This is discussed, for example, here: http://social.msdn.microsoft.com/Forums/en-US/winformsdesigner/thread/63ddb457-f769-44db-87cc-9e88e74929e8[^].

—SA
 
Share this answer
 
Comments
Maciej Los 2-Apr-13 2:35am    
+5
Sergey Alexandrovich Kryukov 2-Apr-13 8:54am    
Thank you, Maciej.
—SA

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