PageDataGrid<DataItemClass>.OnSetColumnsDisplayIndex Method | ![]() |
Namespace: SOWIWin.Helper
Normally puts columns order by DataGridView object (must a instance) property Order
For a example see SetViewBag()
Another way is overwrite this method and puts the columns display order. See following example:
this.PageDataGridUI.DataGridMain.Columns[GetColumnIndexByName("ID")].DisplayIndex = 0; this.PageDataGridUI.DataGridMain.Columns[GetColumnIndexByName("ClientID")].DisplayIndex = 1; this.PageDataGridUI.DataGridMain.Columns[GetColumnIndexByName("Identification")].DisplayIndex = 2; this.PageDataGridUI.DataGridMain.Columns[GetColumnIndexByName("Group")].DisplayIndex = 3; this.PageDataGridUI.DataGridMain.Columns[GetColumnIndexByName("Name")].DisplayIndex = 4; this.PageDataGridUI.DataGridMain.Columns[GetColumnIndexByName("LanguageIn")].DisplayIndex = 5; this.PageDataGridUI.DataGridMain.Columns[GetColumnIndexByName("LanguageOut")].DisplayIndex = 6; this.PageDataGridUI.DataGridMain.Columns[GetColumnIndexByName("TextIn")].DisplayIndex = 7; this.PageDataGridUI.DataGridMain.Columns[GetColumnIndexByName("TextOut")].DisplayIndex = 8; this.PageDataGridUI.DataGridMain.Columns[GetColumnIndexByName("Flag")].DisplayIndex = 9;