如何将datagrid单元格中的空值添加到同一数据网格中另一个单元格中的整数值 [英] how to add a null value in a datagrid cell to an integer value in another cell in the same datagrid

查看:83
本文介绍了如何将datagrid单元格中的空值添加到同一数据网格中另一个单元格中的整数值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,



可以有人指出这一点。我有一个datagrid,我试图将column3中的所有值汇总在一起,该列中的一些单元格具有空值,而其他单元格具有整数值,如下所示。就像在第3列下面的单元格下面的值400并且与蓝色相邻并且材料棉花是空的(空)值并且这继续沿着该行向下,所以我如何将列中的整个单元格加在一起。



Column1 Column2 Column3 Column4



- 1件衬衫400 0 ----------(节点或父节点)

蓝色1 --------(子节点或子行)

棉花1 --------(子节点或儿童排)



- 3吊带背心350 0 ----------(节点或父节点)

白色2 --------(子节点或子行)

亚麻2 --------(子节点或子行)

仅按175 2 --------(子节点或子行)



- 2连衣裙250 0 ----------(节点)或者削减nt node)

黄色3 --------(子节点或子行)

Wool 3 --------(子节点或儿童排)

仅按-125 3 --------(子节点或子排)



- 2短裤450 0 ----------(节点或父节点)

黄色4 --------(子节点或子行)

羊毛4 --------(子节点或子行)

仅按-225 4 --------(子节点或子行)



问候



ade

Hi all,

can someone point the way on one this. I have a datagrid and am trying to sum up all the values in column3 together, some cells in that column have null values while others have integer values as you can see below. Like below the cell under column 3 under the value 400 and adjacent to colour blue and the material cotton are empty (null) values and this goes on down the row so how can i sum the entire cells in the column together.

Column1 Column2 Column3 Column4

- 1 blouse 400 0 ----------(node or parent node)
Blue 1 --------(Sub node or child row)
Cotton 1 --------(Sub node or child row)

- 3 Camisole 350 0 ----------(node or parent node)
White 2 --------(Sub node or child row)
Linen 2 --------(Sub node or child row)
Press Only 175 2 --------(Sub node or child row)

- 2 Dress 250 0 ----------(node or parent node)
Yellow 3 --------(Sub node or child row)
Wool 3 --------(Sub node or child row)
Press Only -125 3 --------(Sub node or child row)

- 2 Shorts 450 0 ----------(node or parent node)
Yellow 4 --------(Sub node or child row)
Wool 4 --------(Sub node or child row)
Press Only -225 4 --------(Sub node or child row)

regards

ade

推荐答案

你在用数据库?然后最好从数据库中添加数据。它将更准确,编码更少。
Are you using database? Then it will be better to add the data from the database. it will be more accurate and less coding.


这篇关于如何将datagrid单元格中的空值添加到同一数据网格中另一个单元格中的整数值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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