c# - Accessing array of child objects in c#
问题描述
I am having a scenario like the following in datagridView - CellPaintingEvent
object cellValue = e.FormattedValue;
through the above sequence i am getting array of values sometimes i.e:
cellValue = system.object[];
pls let me know how to access all those child objects value.
Thanks in advance
解决方案
CellPainting 事件适用于具有单个值的单个单元格。FormattedValue 不是数组。你查过 MSDN 吗?他们有一些示例如何使用事件和 DataGridViewCellPaintingEventArgs:
推荐阅读
- java - 返回 int 唯一值
- swift - IOS13,隐藏图像选择器导航栏
- java - Cassandra/Datastax:如何在 java 中获取具有列表数据类型的列的值
- mysql - 在 sql 中填充动态列
- ios - 在 ios 中集成 Sandisk Connect Wireless Stick
- r - Shiny 中的先前输入
- tensorflow - keras LSTM 功能 API 多输入
- scala - 我们是否需要测试因异常而失败的公共方法的失败场景?
- android - 使用搜索视图过滤自定义列表项
- nexus3 - docker 上的 Nexus sonatype/nexus3:3.17.0 告诉它只使用一个 cpu