在Web应用程序中显示数据时出现问题 [英] Problem displaying data in my web application.

查看:91
本文介绍了在Web应用程序中显示数据时出现问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个调查应用程序,我必须在我的数据库中搜索调查名称。

如果存在调查名称,我必须显示问题及其答案选项,

向用户显示该调查名称下的哪些问题。

我可以使用哪个控件来显示该调查中的问题和答案?

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?

推荐答案

我个人会使用DataGridView。

您可以使用名为问题的列来保存问题。

然后,使用一个名为answers的列,它是一个DataGridViewComboBoxColumn,它包含所有可能的答案。

请参阅DataGridView列类型:http://msdn.microsoft.com/en-us/library/bxt3k60s.aspx [ ^ ]



如果不想在答案列中使用ComboBox,可以使用嵌套的DataGridView显示问题的所有答案。



从调查切换到调查,我会在DataGridView中填写所有问题/答案。

因此,DataGridView一次只显示一项调查的信息。
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.


这篇关于在Web应用程序中显示数据时出现问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆