Created
August 29, 2017 02:23
-
-
Save strepicor/ef02706dc21379106eb72131e1b3748c to your computer and use it in GitHub Desktop.
UltraGrid Column Header Name, Width & Position
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void grdName_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs args) | |
{ | |
foreach (Infragistics.Win.UltraWinGrid.UltraGridColumn col in grdName.DisplayLayout.Bands[0].Columns) | |
{ | |
if(col.Key == "DB_Col_Name_1") | |
{ | |
col.Header.Caption = "Column Name 1"; | |
col.Width = 100; | |
col.Header.VisiblePosition = 1; | |
} | |
else if(col.Key == "DB_Col_Name_2") | |
{ | |
col.Header.Caption = "Column Name 2"; | |
col.Width = 50; | |
col.Header.VisiblePosition = 2; | |
} | |
//.... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment