开发者

New item field on top of DataGridView

开发者 https://www.devze.com 2022-12-13 09:01 出处:网络
DataGridView in .Net has built-in support for adding new items at the bottom. Last row is treated in a special way. The IBindingSource interface supports this through AddNew/EndNew/CancelNew methods.

DataGridView in .Net has built-in support for adding new items at the bottom. Last row is treated in a special way. The IBindingSource interface supports this through AddNew/EndNew/CancelNew methods. Is it possible to change this to allow adding items in the top row of the grid instead?

I know I can do sourceList.Insert(0, item) programmatically for a start, but devil is in the details and I wonder if there is already a way开发者_开发知识库 to do this.

The data is coming from a bound IBindingList (not a database).


Can you add a insert DateTime column and sort the grid to this column ? (one solution) If you really really need this feature, consider using a 3rd party grid like JANUS or DevExpress and check if they support it.

also check out:

SO Old Question

0

精彩评论

暂无评论...
验证码 换一张
取 消