有没有办法合并这两列?这就是我现在所拥有的 。这就是我从代码隐藏创建这两列的方式
GridEditCommandColumn EditColumn = new GridEditCommandColumn();
this.RadGrid1.MasterTableView.Columns.Add(EditColumn);
EditColumn.ButtonType = GridButtonColumnType.ImageButton;
EditColumn.UniqueName = "EditCommandColumn";
EditColumn.HeaderText = "SingleAction";
EditColumn.ColumnGroupName = "test";
GridButtonColumn DeleteColumn = new GridButtonColumn();
this.RadGrid1.MasterTableView.Columns.Add(DeleteColumn);
DeleteColumn.CommandName = "Delete";
DeleteColumn.ButtonType = GridButtonColumnType.ImageButton;
DeleteColumn.UniqueName = "DeleteCommandColumn";
DeleteColumn.ConfirmDialogType = GridConfirmDialogType.Classic;
DeleteColumn.HeaderText = "SingleAction";
DeleteColumn.ConfirmText = "Do you really want to delete?";
现在我想实现这样 的事情 我试图做这样的 GridCalculatedColumn
GridCalculatedColumn calcol = new GridCalculatedColumn();
calcol.DataFields =new string[]{"EditCommandColumn","DeleteCommandColumn"};
calcol.Expression ="{0}-{1}";
tableViewProjects.Columns.Add(calcol);
但是,我无法实现我想要的。我得到一个错误列 [EditCommandColumn] 不存在,我认为这是有道理的,因为它不是数据库中的数据字段。那么,有没有办法实现这一点。
请帮忙,提前谢谢