比较两个Gridview包含的内容并更改行颜色 [英] compare between Two Gridview contains and change the row color

查看:61
本文介绍了比较两个Gridview包含的内容并更改行颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,每个人,

我尝试制作必须使用Gridview的程序.
一个包含The Databasae中的所有数据,另一个包含其中一些数据

然后尝试通过更改gridview1中行的颜色来比较这两个GridView并显示gridview1包含gridview2中的数据.


请帮助我..

Hello Every one ,

I try to make program .. which have to Gridview
one contains all Data in The Databasae and another is contains some of these data

and I try to compare between this Two GridView and show that gridview1 is contains the data in gridview2 by change the color of row in the gridview1...


please help me..

推荐答案

比较这些gridview的基础数据源(DataTables,Collection)可能会更容易,然后更改适当的行的颜色(而不是而不是直接比较gridview数据.)
It might be easier to compare the underlying datasources (DataTables, Collection) for these gridviews and then changing the color of the appropriate rows (rather than comparing the gridview data directly).


Abhinav S 已经提供了满足您需求的最佳方法.以下是一些支持您的基本链接.

比较两个集合是否相等
如何比较两个数据表
如何比较两个GridView行
比较2个Gridview行值,并写出不匹配的

上述链接都不是您所提问题的完整答案.您可以获取一些基本概念并根据需要对其进行自定义.
Abhinav S already provided the best way to fulfill your requirement. Following are some basic links to support you.

Comparing two collections for equality
How to compare two dataTables
How to compare two GridView rows
Compare 2 Gridview row values and write those who doesn''t match

None of the above links are complete answer for your question. You can get some basic concepts and customize them according to your requirement.


这篇关于比较两个Gridview包含的内容并更改行颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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