如何在wpf应用程序中刷新datagrid [英] How to refresh datagrid in wpf application

查看:90
本文介绍了如何在wpf应用程序中刷新datagrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨...

我想在wpf应用程序中刷新datagrid中的行...我使用查询执行插入,更新和删除操作,数据库已更改,但没有更新datagrid ...我如何使用c#执行该操作..

在此先感谢

swathi

hi...
I want to refresh the rows in datagrid in wpf application...I had perform insert,update and delete operations using queries and database has changed but no updations occured on the datagrid...how i can perform that using c#..
Thanks in Advance
swathi

推荐答案

试试这个代码

datagrid.Items.Refresh();
try this code
datagrid.Items.Refresh();


这篇关于如何在wpf应用程序中刷新datagrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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