Default preferences of the Grid
Namespace: Dapfor.Net.UiAssembly: Dapfor.Net (in Dapfor.Net.dll) Version: 2.10.3.24917 (2.10.3.24917)
Syntax
| C# |
|---|
public sealed class PreferencesGrid |
| Visual Basic |
|---|
Public NotInheritable Class PreferencesGrid |
| Visual C++ |
|---|
public ref class PreferencesGrid sealed |
| F# |
|---|
[<SealedAttribute>] type PreferencesGrid = class end |
Examples
How to customize UI elements of the Grid
public void HowToCustomizeAppearance(Grid grid) { //Set default background color for even rows in all grids Preferences.Grid.EvenRowsAppearance.BackColor = Color.White; //Create headers and columns Header header1 = new Header(); Column column = new Column("SomeId"); //Show icons in all cells, belong to this column column.CaptionImage = Image.FromFile("SomeImage.jpg"); header1.Add(column); //Add headers to the grid Header header2 = new Header(); grid.Headers.Add(header1); grid.Headers.Add(header2); //Add a new row to the grid Row row = grid.Rows.Add(new SomeObject()); //Change default behavior and set a new text color for the already added row row.Appearance.ForeColor = Color.Green; //Change the color only for the specified cell row["SomeId"].Appearance.BackColor = Color.Red; } | |