如何将一次单元格值分配给同一行的另一个单元格 [英] how to assign once cell value to another cell of same row

查看:120
本文介绍了如何将一次单元格值分配给同一行的另一个单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

如何在网格的行数据绑定事件中将一个单元格值分配给另一个单元格?
我是否需要使用edititemtemplete来保存标签n为该标签分配值以显示所需的值?

我尝试了以下

hello friends,

How can i assign one cell value to another cell in row databound event of grid?
Is it I require to use edititemtemplete to hold label n assign value to that label to display the required value?

I tried following

e.row.cell[6] = e.row.cell[5].tostring();



但是它没有给出所需的值

知道怎么做吗?

在此先感谢=)



But it is not giving the required value

Any idea how to go about it??

Thanks in advance =)

推荐答案

使用数据绑定来分配值,您可以将数据源中的同一值分配给多个单元格.除非有特殊原因,否则您需要在数据绑定事件中执行此操作.
Use databinding to assign the values, you can assign the same value from the datasource to multiple cells. Unless there is some particular reason you need to do it in the databinding event.


这篇关于如何将一次单元格值分配给同一行的另一个单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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