简体   繁体   中英

Adding column of buttons for each row in gridcontrol devexpress

How can I add a column of buttons near binded list items of gridcontrol devexpress? Binded list of items to gridcontrol as follows:

List<AnObject> lst = new List<AnObject>();
SqlDataReader sdr = cmd.ExecuteReader();
while (sdr.Read()){
  AnObject object = new AnObject();
  object.ID = Convert.ToInt32(s["ID"]);
  object.Name = s["Name"].ToString();

  lst.Add(object);
}
gridControl1.DataSource = lst;

I need to add button at the rightside of each row. Because with click event need to do some work.

Thanks.

I can assign the RepositoryItemButtonEdit editor to the specific column in your GridView. Then you can handle the ButtonClick event for button of these editors. To show buttons within separate column you can add a new unbound column .

Related help-article: Assigning Editors to Columns and Card Fields

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM