'宣言 Public Property HeaderClickAction As HeaderClickAction
public HeaderClickAction HeaderClickAction {get; set;}
HeaderClickAction を設定して列の並べ替えを有効にすると、グループ ヘッダーによる選択は無効になります。グループ ヘッダーは並べ替えには使用できません。HeaderClickAction.SortSingle と HeaderClickAction.SortMulti の各設定は列ヘッダーに対してのみ有効です。
このプロパティを HeaderClickAction.SortMulti に設定すると、マウスと [Shift] キーを組み合わせて、並べ替えに使用する列を複数選択できます。列の選択順に従ってデータの並べ替えが行われます。
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub Button50_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button50.Click ' HeaderClickAction indicates the action that the UltraGrid should take when a column ' header is clicked. Select causes the UltraGrid to select the column and SortMulti or ' SortSingle causes it to sort the column. Default is SortMulti in OutLookGroupBy ' view style and Select otherwise. ' Set the HeaderClickAction on the layout's override. Me.ultraGrid1.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortMulti ' You can override that grid-wide setting for a particular band by setting it on the ' override of that band. Me.ultraGrid1.DisplayLayout.Bands(1).Override.HeaderClickAction = HeaderClickAction.Select End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button50_Click(object sender, System.EventArgs e) { // HeaderClickAction indicates the action that the UltraGrid should take when a column // header is clicked. Select causes the UltraGrid to select the column and SortMulti or // SortSingle causes it to sort the column. Default is SortMulti in OutLookGroupBy // view style and Select otherwise. // Set the HeaderClickAction on the layout's override. this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = HeaderClickAction.SortMulti; // You can override that grid-wide setting for a particular band by setting it on the // override of that band. this.ultraGrid1.DisplayLayout.Bands[1].Override.HeaderClickAction = HeaderClickAction.Select; }