G
Guest
Hello everyone,
I am really stumped about how to accomplish this and I am looking for
suggestions, and opinions on the best way to handle this scenario:
I am writing a Questionnaire application in VS 2005, using .NET 2.0.
The form uses a datagrid to display questions and answers on it. I have a
Question Object and a Questionnaire object defined. The Questionnaire Object
has a collection of Question objects. The Questionnaire.questions method
returns my collection, which I set as the datasource of my datagrid. I have
also used a binding source wrapper to my Question object to access the
methods I want displayed in the datagrid. So far so good. All is working
well.
The problem I want to solve is that the Question Objects contain a
QuestionType object. one of the specific types is a YesNoQuestionType.
Another QuestionType is a FreeTextQuestionType.
I want my datagrid to display the appropriate ColumnStyle for each question
displayed. So If a FreeText Question in the list, it displays a textbox to
edit the answer for. If I have a Yes No question, it should display a
combobox column that I can choose Yes or No as the answer.
Like I said, I don't even know if this is possible, but if it is, please let
me know.
Thanks
I am really stumped about how to accomplish this and I am looking for
suggestions, and opinions on the best way to handle this scenario:
I am writing a Questionnaire application in VS 2005, using .NET 2.0.
The form uses a datagrid to display questions and answers on it. I have a
Question Object and a Questionnaire object defined. The Questionnaire Object
has a collection of Question objects. The Questionnaire.questions method
returns my collection, which I set as the datasource of my datagrid. I have
also used a binding source wrapper to my Question object to access the
methods I want displayed in the datagrid. So far so good. All is working
well.
The problem I want to solve is that the Question Objects contain a
QuestionType object. one of the specific types is a YesNoQuestionType.
Another QuestionType is a FreeTextQuestionType.
I want my datagrid to display the appropriate ColumnStyle for each question
displayed. So If a FreeText Question in the list, it displays a textbox to
edit the answer for. If I have a Yes No question, it should display a
combobox column that I can choose Yes or No as the answer.
Like I said, I don't even know if this is possible, but if it is, please let
me know.
Thanks