ComboBox in DataGrid?

  • Thread starter Thread starter James Goodman
  • Start date Start date
J

James Goodman

I have seen several examples on how to get a combobox control into a datagrid control via code.

I am currently writing an app that will have a lot of combo columns within datagrids, so setting this through code will be extremely long-winded. I have found it much quicker to add the columns I require through the GridColumnStyles collection in the design window. When this is used, you select whether to add a text control (DataGridTextBoxColumn) or checkbox control (DataGridBoolColumn).
Is it possible to add a combo box control to this collection so I can add them graphically as this would make life much easier?




--
Cheers,


James Goodman MCSE, MCDBA
http://www.angelfire.com/sports/f1pictures
 
On a related subject, I seem to be having a problem with my combo boxes in a datagrid:

I used the two public classes from (http://www.syncfusion.com/FAQ/WinForms/FAQ_c44c.asp#q480q). They come packaged inside a namespace, but because I just wanted to use their classes I removed the namespace assignations (Namespace DataGridTextBoxCombo)

I have since created my datagrid & added a single combo column to test it. Nothing is noted in the task list & it compiles succesfully. However when I attempt to open the form in question (which is an MDI child) the line 'Public Class frmMain' in the MDI parent form errors, stating "Object reference not set to an instance of an object."

Can anyone shed any light on this?
Am I going about this in the right way (new to .net)



--
Cheers,


James Goodman MCSE, MCDBA
http://www.angelfire.com/sports/f1pictures
 
Back
Top