'宣言 Public Event FilterCellValueChanged As FilterCellValueChangedEventHandler
public event FilterCellValueChangedEventHandler FilterCellValueChanged
イベント ハンドラが、このイベントに関連するデータを含む、FilterCellValueChangedEventArgs 型の引数を受け取りました。次の FilterCellValueChangedEventArgs プロパティには、このイベントの固有の情報が記載されます。
プロパティ | 解説 |
---|---|
ApplyNewFilter | 新しく入力されたフィルターを適用するかどうかを示す値を取得または設定します。 |
FilterCell | ユーザーが変更したフィルターセル。 |
FilterCellValueChanged イベントは、ユーザーがフィルター行のセルを編集したときに発生します。
Imports Infragistics.Shared Imports Infragistics.Win Imports Infragistics.Win.UltraWinGrid Private Sub UltraGrid1_FilterCellValueChanged(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.FilterCellValueChangedEventArgs) Handles UltraGrid1.FilterCellValueChanged ' Get the filter cell whose value changed. Dim filterCell As UltraGridFilterCell = e.FilterCell Dim editor As EmbeddableEditorBase = filterCell.EditorResolved System.Diagnostics.Debug.WriteLine("FilterCellValueChanged: ") System.Diagnostics.Debug.WriteLine(" New Text = " & editor.CurrentEditText) If editor.IsValid Then ' If the user has entered a valid value in the editor then write it out. System.Diagnostics.Debug.WriteLine(" New Value = " & editor.Value.ToString()) Else ' A value can be invallid for example if the field is a date time field ' and the user has not fully input a date. System.Diagnostics.Debug.WriteLine(" New Value is Invalid") End If ' You can conditionally cause or prevent the UltraGrid from re-filtering the ' rows based on the new filter value by setting the ApplyNewFilter to true ' or false respectively. e.ApplyNewFilter = False End Sub
using Infragistics.Shared; using Infragistics.Win; using Infragistics.Win.UltraWinGrid; using System.Diagnostics; private void UltraGrid1_FilterCellValueChanged(object sender, Infragistics.Win.UltraWinGrid.FilterCellValueChangedEventArgs e) { // Get the filter cell whose value changed. UltraGridFilterCell filterCell = e.FilterCell; EmbeddableEditorBase editor = filterCell.EditorResolved; System.Diagnostics.Debug.WriteLine( "FilterCellValueChanged: " ); System.Diagnostics.Debug.WriteLine( " New Text = " + editor.CurrentEditText ); if ( editor.IsValid ) { // If the user has entered a valid value in the editor then write it out. System.Diagnostics.Debug.WriteLine( " New Value = " + editor.Value.ToString( ) ); } else { // A value can be invallid for example if the field is a date time field // and the user has not fully input a date. System.Diagnostics.Debug.WriteLine( " New Value is Invalid" ); } // You can conditionally cause or prevent the UltraGrid from re-filtering the // rows based on the new filter value by setting the ApplyNewFilter to true // or false respectively. e.ApplyNewFilter = false; }