我想在水平上显示提出的问题的答案 [英] i want to display the answer of questions ASKED in level

查看:55
本文介绍了我想在水平上显示提出的问题的答案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实际上,我有一个数据库,其中包含问题选项和答案,以及根据难度级别选择的问题r,我希望它显示级别中所问所有问题的正确答案,例如,如果我有100个问题数学和用户会遇到10个问题 然后在级别结束时,它会显示这10个问题的答案,并不是所有问题都问..到目前为止,我不知道我所做的是使差异级别和科目符合要求,但是不知道如何获得答案

actually i have a database with question  options and answer and  questioons r selected on the basis if difficulty level i want it to display the right answers of all question asked in level eg if i got 100 questions for maths and user get 10 questions then at the end of level it shud display the answer of those 10 questions asked not all .. any idea what i have done so far is to get quest acc to diff level and subjects but have no idea how to get answers 

这么长的时间都无法回答答案

and all that suff so long bt no idea for answers 

thnxx 

thnxx 

推荐答案

假设您的UI是Windows窗体,则可以使用ListView显示问题集/答案在用户回答了问题之后.用以下数据填充ListView:

Assuming your UI is a Windows Form, you could use a ListView to display the set of questions/answers after the questions has been answered by the user. Populate the ListView with the data something like this:

private void PopulateAnswerListView()
{
    this.listView1.Items.Clear();
    ListViewItem item;
    foreach(DataRow row in quest_.Rows)
    {
        item = this.listView1.Items.Add(row["Question"].ToString());
        item.SubItems.Add(row["Answer"].ToString());
    }
}

您应该已经用两列定义了listView1,像这样:

You should have already defined your listView1 with two columns, like this:

this.listView1.Columns.Add("Questions",100);
this.listView1.Columns.Add("Answers",100);



这篇关于我想在水平上显示提出的问题的答案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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