'宣言 Public Enum SelectType Inherits System.Enum
public enum SelectType : System.Enum
メンバ | 解説 |
---|---|
Default | デフォルトを使用します。オブジェクトの親の設定が使用されます。 |
Extended | 展開選択。一度に複数のオブジェクトを選択できます。 |
ExtendedAutoDrag | 複数のアイテムを選択可能な場合に使用する方法。マウスの左ボタンを押しながらドラッグすると、他のアイテムが選択されるのではなく、選択したアイテムが即座にドラッグされます。 |
None | なし。オブジェクトは選択できません。 |
Single | 単一選択。同時に選択できるオブジェクトは1つのみです。 |
SingleAutoDrag | 1つの項目のみを選択できる選択方式です。マウス左ボタンを押しながらドラッグすると、他の項目が選択されるのではなく、すでに選択されている項目がただちにドラッグされます。 |
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub Button48_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles button48.Click ' Set the SelectTypeRow to Single so only a single row can be selected at a ' time. Setting it on the layout's Override applies it to the whole grid. Me.UltraGrid1.DisplayLayout.Override.SelectTypeRow = SelectType.Single ' You can override the grid-wide setting (setting on the layout's Override) on a ' particular band by setting the associated properties on that band's Override. ' Following code sets the SelectTypeRow on the band 0 override to allow the user ' to select multiple rows that band. Me.UltraGrid1.DisplayLayout.Bands(0).Override.SelectTypeRow = SelectType.Extended ' You can set the MaxSelectedRows to limit the number of rows the user can select. Me.UltraGrid1.DisplayLayout.Bands(0).Override.MaxSelectedRows = 100 End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void button48_Click(object sender, System.EventArgs e) { // Set the SelectTypeRow to Single so only a single row can be selected at a // time. Setting it on the layout's Override applies it to the whole grid. this.ultraGrid1.DisplayLayout.Override.SelectTypeRow = SelectType.Single; // You can override the grid-wide setting (setting on the layout's Override) on a // particular band by setting the associated properties on that band's Override. // Following code sets the SelectTypeRow on the band 0 override to allow the user // to select multiple rows that band. this.ultraGrid1.DisplayLayout.Bands[0].Override.SelectTypeRow = SelectType.Extended; // You can set the MaxSelectedRows to limit the number of rows the user can select. this.ultraGrid1.DisplayLayout.Bands[0].Override.MaxSelectedRows = 100; }