How to Select row using checkedit gridcontrol devexpress? [closed]

混江龙づ霸主 提交于 2019-12-07 17:01:09

问题


i have a winfrom using C# in my coding , and i use gridcontrol devexpress 2010 to show data contact list.

here is my form

after select those list i get the value from gridcontrol that i select and press button OK to get it. I don't know the code.

anyone can suggest me,....thanks


回答1:


First of all i suggest you to the KB article: How to select rows via an unbound checkbox column

Starting with version 13.2, the GridView in the XtraGrid control provides a built-in checkbox column for multiple row selection. See the following help topic to learn more: Multiple Row Selection via Built-In Check Column

In versions prior to 13.2, you can use the following two methods to manually implement a column for row selection:

  1. Add a Boolean data column to your data source that will maintain the selected state of rows.
  2. Use an unbound grid column.

The first approach is easy to implement, but adding "dummy" columns to data is often forbidden due to the constraints of an application's business logic.

The second approach is clarified below.

Create an array that will store the selected states of rows. Create an Unbound Column whose values will be in sync with the array. Write a CustomUnboundColumnData event handler to get/set unbound column values.
See perfect example of this here:
DevExpress XtraGrid Control with checkBoxEdit column

References:
DevExpress Example:Multiple selection using checkbox (web style)

Hope this help..



来源:https://stackoverflow.com/questions/29359705/how-to-select-row-using-checkedit-gridcontrol-devexpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!