'宣言 Public Enum EmptyRowStyle Inherits System.Enum
public enum EmptyRowStyle : System.Enum
メンバ | 解説 |
---|---|
AlignWithDataRows | 空行を拡張しません。空行はデータ行に揃います。 |
ExtendFirstCell | 各空行の最初の表示セルを左いっぱいまで拡張することにより、空行をUltraGrid (より正確にはスクロールリージョン) の左端に揃えます。 |
ExtendRowSelector | 各空行の行セレクターを左いっぱいまで拡張することにより、空行をUltraGrid (より正確にはスクロールリージョン) の左端に揃えます。 |
HideRowSelector | 空行をデータ行に揃えますが、行セレクターを非表示にします。その代わりに、最初のセルを拡張して行セレクターのあった領域を占めます。行セレクターが有効でない場合、このオプションは AlignWithDataRows と同じように動作します。 |
PrefixWithEmptyCell | 最初のセルより前の領域に空のセルが含まれます。このオプションは ExtendFirstCell とほぼ同じように動作しますが、グリッドの左端と行の間の領域を占める方法として最初のセルを拡張する代わりにセルをもう 1 つ追加する点が異なります。 |
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraGrid1_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles UltraGrid1.InitializeLayout ' To enable empty row settings set the ShowEmptyRows property to true. e.Layout.EmptyRowSettings.ShowEmptyRows = True ' Style property controls how the empty rows look. It controls aspects like ' whether the row selectors of empty rows are displayed, whether the empty ' rows are extended left to occupy pre row area space and if so how they are ' extended etc... e.Layout.EmptyRowSettings.Style = EmptyRowStyle.PrefixWithEmptyCell ' CellAppearance property of EmptyRowSettings controls the appearance of ' cells of empty rows. e.Layout.EmptyRowSettings.CellAppearance.BackColor = Color.LightYellow ' RowAppearance property of EmptyRowSettings controls the appearance of ' empty rows. e.Layout.EmptyRowSettings.RowAppearance.BackColor = Color.LightYellow ' RowSelectorAppearance property of EmptyRowSettings controls the appearance ' of row selectors of empty rows, if the row selectors of empty rows are visible. e.Layout.EmptyRowSettings.RowSelectorAppearance.BackColor = Color.Gray ' EmptyAreaAppearance property of EmptyRowSettings controls the appearance ' of the empty rows area. Empty rows area contains all the empty rows. e.Layout.EmptyRowSettings.EmptyAreaAppearance.BackColor = SystemColors.Window End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void UltraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { // To enable empty row settings set the ShowEmptyRows property to true. e.Layout.EmptyRowSettings.ShowEmptyRows = true; // Style property controls how the empty rows look. It controls aspects like // whether the row selectors of empty rows are displayed, whether the empty // rows are extended left to occupy pre row area space and if so how they are // extended etc... e.Layout.EmptyRowSettings.Style = EmptyRowStyle.PrefixWithEmptyCell; // CellAppearance property of EmptyRowSettings controls the appearance of // cells of empty rows. e.Layout.EmptyRowSettings.CellAppearance.BackColor = Color.LightYellow; // RowAppearance property of EmptyRowSettings controls the appearance of // empty rows. e.Layout.EmptyRowSettings.RowAppearance.BackColor = Color.LightYellow; // RowSelectorAppearance property of EmptyRowSettings controls the appearance // of row selectors of empty rows, if the row selectors of empty rows are visible. e.Layout.EmptyRowSettings.RowSelectorAppearance.BackColor = Color.Gray; // EmptyAreaAppearance property of EmptyRowSettings controls the appearance // of the empty rows area. Empty rows area contains all the empty rows. e.Layout.EmptyRowSettings.EmptyAreaAppearance.BackColor = SystemColors.Window; }