逐个单元格设置gridview的内容 [英] Set the content of gridview cell by cell

查看:81
本文介绍了逐个单元格设置gridview的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何设置gridview的单个单元格的内容。例如,我想在第2行设置网格单元格,第3列= 67像winforms组件一个网格提供此功能为c1grid(2,3)= 67.我需要在我的应用程序中使用相同的功能。很多时候它很好能够进行一系列计算并将结果直接写入网格。我不想绑定任何东西,我只对单个单元格的值感兴趣。



我可以在asp.net中使用默认的gridview吗?或者我是否需要使用任何第三方网格?哪个第三方网格提供此类功能?我见过asp.net(wijmo)组件一格的pdf。但我还没有看到任何能满足我要求的东西。





有什么帮助吗?任何想法?

How do you set the content of single cell of gridview. For example I would like to set the grid cell at row 2, column 3 = 67 like winforms component one grid provides this functionality as c1grid(2,3) = 67. same functionality i need in my app.Many times it is nice to be able to do a series of calculations and write the results directly to the grid. I don't want to bind to anything and I am only interested in the values of a single cell.

can i do this with default gridview in asp.net ? or do i need to use any third party grid ? Which third party grid provides such functionality ? i have seen pdf for component one grid for asp.net(wijmo).But i havent seen any thing that will satisfy my requirement.


Any help? any Idea?

推荐答案





使用可以使用标准ASP.net Gridview实现您的要求。使用时应使用RowDataBound事件。



在Rowdatabound事件中使用嵌套for循环来实现您的要求


use can achieve your requirement using standards ASP.net Gridview. Use should use RowDataBound event for the same.

in Rowdatabound event use nested for loop to achieve your requirement


这篇关于逐个单元格设置gridview的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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