开发者

Devexpress delete a row

Using DevExpress's Grid, what the easiest way to implement a delete of a selection of rows from the UI only. The desired behavior is for the user 开发者_如何学编程to multi-select rows then press DEL.

I have enabled editing and multi-select.


From Devexpress Support Center and assuming that you are referring to a Windows Form Grid:

To delete multiple selected rows use the GridView.DeleteSelectedRows method. If you need to conditionally protect some rows from deletion, iterate through the GridView.SelectedRows array, and unselect certain rows using the GridView.UnselectRow method.

How to delete the multiple rows in the grid?

You also need to handle the key down event of the grid if you want to delete the selected rows on a key press.

If it's not Windows Forms you can search their Support Center by product. From my experience the technical support there is very nice.


The method that I use generally is,

GridView.DeleteRow(GridView.FocusedRowHandle)

It works well.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜