完全控制gridview行 [英] complete control of gridview row

查看:92
本文介绍了完全控制gridview行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有数据表的gridview,其中包含类似于ex的数据。

名称金额

a 10000

b 20000

c 30000

d 45000等等。

我的要求是以下列格式显示数据。



第1排: - 10000 b 20000

第2排: - c 30000

第3排: - d 45000 e 85000

和依赖于我的条件。



im尝试在rowdatabound事件中执行此操作但无法完成任务。

我怎样才能获得完全控制特定网格行和它的每个单元格?我应该使用什么样的网格以及如何使用?我必须使用任何第三方控件吗?帮助我..





提前致谢。

i have a gridview binded with a datatable which contains data like for ex.
name amount
a 10000
b 20000
c 30000
d 45000 and so on.
my requirement is to display the data in following format.

1st row:- a 10000 b 20000
2nd row:- c 30000
3rd row:- d 45000 e 85000
and so on depending on my conditions.

i m trying to do it in rowdatabound event but not able to achieve the task.
How can i get the complete control over a particular grid row and each cell of it ? what event of grid should i use and how ? Do i have to use any third party control for this ? Help me..


Thanks in advance.

推荐答案

如果你的数据集实际上是



If your data set is really

a 10000
b 20000
c 30000
d 45000
e 85000





每个人都排回去从你的数据集,然后能够做类似的事情





where each one is row back from your data set, then to be able to do something like

1st row:- a 10000 b 20000
2nd row:- c 30000
3rd row:- d 45000 e 85000





您需要按摩数据集中的数据。更改您返回的结果以符合您的需要。这也有助于将业务逻辑排除在用户界面之外,这是一种很好的做法。



you will need to massage the data going INTO the dataset. Change the results you are getting back to match what you need. This will also help keep business logic out of your UI which is a good practice.


这篇关于完全控制gridview行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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