G
Guest
Hi,
I have an application with a DataGridView that displays a Questionnaires
questions and allows a user to fill in answers to these questions in the
gridview.
Each question knows its questionType (Date, Text, or Yes/No/Na). I have
created a custom column that inherits from datagridviewcolumn and have
created a custom cell that inherits from DataGridViewTextBoxCell.
In my cell object, I get the OwningRow.DataBoundItem to reference the
QuestionObject and then Get the QuestionType of the question in that row.
After I do this, I use a select case statement to determine the type of
editing control I need for Edit purposes. This way, Date questions get a
datepicker edit control, YES/NO/NA questions get a combobox edit control and
Text questions get a text box edit control.
I have my DataGridView displaying the correct type of editing controls when
edit mode is entered on the cell. And my Text Box and DatePicker Edit
controls seem to be working right as well.
I am having a problem with the ComboBox edit control for my custom cell.
Even though I specify the Items list for the combobox, when the combobox is
displayed, none of the items show up in the dropdown and even if I type an
answer in the combobox, it doesn't enter edit mode.
There are also some other strange behaviors going on in terms of values
displayed when entering edit modes and in display mode.
I would really appreciate any help here I can get. This has been a big
problem for me to solve and have gotten close, but not yet complete.
Thanks so much in advance for your help.
Guy
I have an application with a DataGridView that displays a Questionnaires
questions and allows a user to fill in answers to these questions in the
gridview.
Each question knows its questionType (Date, Text, or Yes/No/Na). I have
created a custom column that inherits from datagridviewcolumn and have
created a custom cell that inherits from DataGridViewTextBoxCell.
In my cell object, I get the OwningRow.DataBoundItem to reference the
QuestionObject and then Get the QuestionType of the question in that row.
After I do this, I use a select case statement to determine the type of
editing control I need for Edit purposes. This way, Date questions get a
datepicker edit control, YES/NO/NA questions get a combobox edit control and
Text questions get a text box edit control.
I have my DataGridView displaying the correct type of editing controls when
edit mode is entered on the cell. And my Text Box and DatePicker Edit
controls seem to be working right as well.
I am having a problem with the ComboBox edit control for my custom cell.
Even though I specify the Items list for the combobox, when the combobox is
displayed, none of the items show up in the dropdown and even if I type an
answer in the combobox, it doesn't enter edit mode.
There are also some other strange behaviors going on in terms of values
displayed when entering edit modes and in display mode.
I would really appreciate any help here I can get. This has been a big
problem for me to solve and have gotten close, but not yet complete.
Thanks so much in advance for your help.
Guy