Click here to Skip to main content
15,887,989 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a survey application wherein i have to search for survey names in my DB.
If a survey name exists i have to display the questions along with its answer options,
to show the user what questions fall under that survey name.
Which control can i use to display the questions and answers which fall under that survey?
Posted
Updated 2-Sep-13 23:31pm
v2

1 solution

I would personally go with a DataGridView.
You can use a Column named "question" that holds the question.
Then, use a column named "answers" that is a DataGridViewComboBoxColumn which holds all the possible answers.
See DataGridView column types here: http://msdn.microsoft.com/en-us/library/bxt3k60s.aspx[^]

If don't want to use a ComboBox in the answer column, you could use a nested DataGridView to show all answers for the question.

When switching from survey to survey, I would have the DataGridView be filled with all the questions/answers for that survery.
So, the DataGridView only shows information for one survey at a time.
 
Share this answer
 
v2

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