如何使用C#来设置动态数据网格单元格的值在WPF [英] how to set the cell value in dynamic datagrid in wpf using c#

查看:79
本文介绍了如何使用C#来设置动态数据网格单元格的值在WPF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我行ID和列ID

  dataGrid2.Items [行] .Cells [专栏]。文本=TEXT  
行=行索引;
列=列索引;


解决方案

您可以简单地更新底层数据源的价值,其展现在您的DataGrid中。你不需要任何东西指数


I got row id and column id

dataGrid2.Items[row].Cells[column].Text = "text";
row = row index;
column = column index;

解决方案

you can simply update the value of the underlying datasource and its show in your datagrid. you dont need any index stuff

这篇关于如何使用C#来设置动态数据网格单元格的值在WPF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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