Devexpress 如何在网格的布局视图中设置RepositoryItemButtonEdit的文本
我创建了一个网格控件,将主视图设置为布局视图,并在不同的列中添加存储库项,但在目标列中添加按钮“编辑”时。我想用Button的Text属性绑定列数据。我太担心了。告诉我关于如何在网格的布局视图中设置RepositoryItemButtonEdit的文本的任何解决方案您可以处理编辑器即将以非聚焦模式显示时发生的事件Devexpress 如何在网格的布局视图中设置RepositoryItemButtonEdit的文本,devexpress,Devexpress,我创建了一个网格控件,将主视图设置为布局视图,并在不同的列中添加存储库项,但在目标列中添加按钮“编辑”时。我想用Button的Text属性绑定列数据。我太担心了。告诉我关于如何在网格的布局视图中设置RepositoryItemButtonEdit的文本的任何解决方案您可以处理编辑器即将以非聚焦模式显示时发生的事件CustomRowCellEdit private void gridView_CustomRowCellEdit(object sender, CustomRowCellEditEve
CustomRowCellEdit
private
void gridView_CustomRowCellEdit(object sender, CustomRowCellEditEventArgs e)
{
if (e.Column != columnWithButtonEdits) {
BusinessObject obj = (BusinessObject) gridView.GetRow(e.RowHandle);
e.RepositoryItem.Buttons[0].Text = obj.SomeProperty;
}
}
当然,您必须将RepositoryItem
转换为您的类型,并获得所需的按钮