更改datagridview的数据源而不触发SelectionChange事件? [英] Change datasource of datagridview without firing SelectionChange Event?

查看:87
本文介绍了更改datagridview的数据源而不触发SelectionChange事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果datatable有3行,现在使用dataadapter填充行的集合(假定3行),那么它就变成了6行,因为没有删除3个旧行.我先通过清除该数据表中的行,然后开始填充它来解决此问题.
还有其他更简单的方法吗?
感谢您的帮助!

If datatable has 3 rows, now use dataadapter to fill a collection of rows (suppose 3 rows), then it comes to 6 rows because the 3 old rows are not removed. I work around this by clearing rows in that datatable first then starting filling it.
Do we have another way simpler?
Your help would be highly appreciated!

推荐答案

尝试以下Javascript

try the below Javascript

STORE = new Ext.data.JsonStore({
  autoLoad: true,
  url: 'items'
  method: 'GET',
  storeId: 'store',
  root: 'list',
  remoteSort: false,
  fields: ['name']
});


这篇关于更改datagridview的数据源而不触发SelectionChange事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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