Gridview的每个页码上的颜色不同 [英] Different color on every page number of Gridview

查看:58
本文介绍了Gridview的每个页码上的颜色不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我正在创建一个在线考试应用程序,其中我在gridview中逐个显示问题并设置了分页,因此当用户单击任何索引时,它会显示该问题并保存当前页面.

现在,我希望如果用户回答了任何问题,则页码应使用不同的颜色,待处理的问题页码应使用不同的颜色.

有人可以告诉我如何实现吗?

Hello,

I am creating an online exam application in which i am showing questions one by one in gridview and have set paging in it so when user click on any index it shows that question and save the current page.

Now i want that if user have answered any question that page number should come in different color and pending questions page number should be in different color.

Can Some one tell me how can i achieve this?

推荐答案

在RowCommand上选择问题"时,可以在列表中添加该QuestionID,然后将该列表添加到会话中.

在GridView RowDataBound上.

检查在所选问题列表中是否存在CurrentQuestionID.匹配此条件后,您可以更改该RowbackGround颜色或所需的样式.

让我知道您是否需要更多帮助,我将很高兴.
When Question is Selected on RowCommand you may add that QuestionID in List and then Add that List to Session.

on GridView RowDataBound.

Check if CurrentQuestionID is Present in Selected Question List. Once this condition is matched you can change that RowbackGround Color or whaterver style you want.

Let me know if you need any more help and i would be glad to.


这篇关于Gridview的每个页码上的颜色不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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