C# - DevExpress XtraGrid - Master/Detail - Display Format

会有一股神秘感。 提交于 2019-12-05 19:19:15

To format values in a detail GridView, you should obtain an instance of this object first. Pretty much the standard way of doing this is to handle the Master GridView's MasterRowExpanded event handler. In this event handler you can also set a column's DisplayFormat:

private void gridView1_MasterRowExpanded_1(object sender, CustomMasterRowEventArgs e) {
    GridView master = sender as GridView;
    GridView detail = master.GetDetailView(e.RowHandle, e.RelationIndex) as GridView;
    detail.Columns["SomeColumn"].DisplayFormat = ....
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!