在wpf中刷新datagridview [英] refreshing datagridview in wpf

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

问题描述

HI,


我有一个包含100条记录的datagridview,并且在wpf应用程序的按钮单击事件中绑定了记录.

问题是当我单击按钮时,所有记录都绑定到datagridview,但是滚动条显示在最后一条记录上.

我需要将滚动条设置在datagridview的顶部.
有人可以帮我吗?


它在wpf应用程序中.

问候,
Nagaraju.N




I have a datagridview with 100 records, and i binded records in button click event of wpf application.

problem is when i click on the button, all the records are binding to the datagridview, but the scrollbar is displaying at the last record.

i need to set the scrollbar at the top of the datagridview.
can any one help me?


it is in wpf application.

Regards,
Nagaraju.N

推荐答案

DataGridView公开了难以理解的,名字直观的FirstDisplayedScrollingRowIndex,您可以使用它来执行此操作.
The DataGridView exposes the incredibly unintuitively named FirstDisplayedScrollingRowIndex which you can use to do this.


想尝试 ScrollIntoView [

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

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