private void ultraGridSyncrhonousSorting_BeforeRowFilterChanged(object sender, Infragistics.Win.UltraWinGrid.BeforeRowFilterChangedEventArgs e)
{
// If the ProcessMode is set to Synchronous or SynchronousExpanded then the
// UltraGrid will filter the rows before firing AfterSortChange. This lets you
// show a wait cursor.
ProcessMode mode = (ProcessMode)this.ultraComboEditorSyncrhonousSorting_ProcessMode.Value;
e.ProcessMode = mode;
bool showWaitCursor = this.ultraCheckEditorSyncrhonousSorting_ShowWaitCursor.Checked;
if ( showWaitCursor )
{
// Change the cursor to WaitCursor. We are resetting the cursor in the
// AfterRowFilterChanged event handler below.
System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
}
}
#endregion // ultraGridSyncrhonousSorting_BeforeRowFilterChanged
#region ultraGridSyncrhonousSorting_AfterRowFilterChanged
private void ultraGridSyncrhonousSorting_AfterRowFilterChanged(object sender, Infragistics.Win.UltraWinGrid.AfterRowFilterChangedEventArgs e)
{
System.Windows.Forms.Cursor.Current = Cursors.Default;
}
#endregion // ultraGridSyncrhonousSorting_AfterRowFilterChanged
#region ultraGridSyncrhonousSorting_BeforeRowFilterDropDownPopulate
private void ultraGridSyncrhonousSorting_BeforeRowFilterDropDownPopulate(object sender, Infragistics.Win.UltraWinGrid.BeforeRowFilterDropDownPopulateEventArgs e)
{
// Add our own custom filter conditions.
// Set Handled to true to cause the UltraGrid to skip adding its own filter items.
e.Handled = true;
ColumnFilter cf;
for ( int i = 0; i < 10; i++ )
{
cf = new ColumnFilter( e.Column, FilterLogicalOperator.And );
int val1 = i * 100;
int val2 = ( 1 + i ) * 100;
cf.FilterConditions.Add( FilterComparisionOperator.GreaterThanOrEqualTo, val1 );
cf.FilterConditions.Add( FilterComparisionOperator.LessThan, val2 );
e.ValueList.ValueListItems.Add( cf, ">= " + val1 + " and < " + val2 );
}
}
{
// If the ProcessMode is set to Synchronous or SynchronousExpanded then the
// UltraGrid will filter the rows before firing AfterSortChange. This lets you
// show a wait cursor.
ProcessMode mode = (ProcessMode)this.ultraComboEditorSyncrhonousSorting_ProcessMode.Value;
e.ProcessMode = mode;
bool showWaitCursor = this.ultraCheckEditorSyncrhonousSorting_ShowWaitCursor.Checked;
if ( showWaitCursor )
{
// Change the cursor to WaitCursor. We are resetting the cursor in the
// AfterRowFilterChanged event handler below.
System.Windows.Forms.Cursor.Current = Cursors.WaitCursor;
}
}
#endregion // ultraGridSyncrhonousSorting_BeforeRowFilterChanged
#region ultraGridSyncrhonousSorting_AfterRowFilterChanged
private void ultraGridSyncrhonousSorting_AfterRowFilterChanged(object sender, Infragistics.Win.UltraWinGrid.AfterRowFilterChangedEventArgs e)
{
System.Windows.Forms.Cursor.Current = Cursors.Default;
}
#endregion // ultraGridSyncrhonousSorting_AfterRowFilterChanged
#region ultraGridSyncrhonousSorting_BeforeRowFilterDropDownPopulate
private void ultraGridSyncrhonousSorting_BeforeRowFilterDropDownPopulate(object sender, Infragistics.Win.UltraWinGrid.BeforeRowFilterDropDownPopulateEventArgs e)
{
// Add our own custom filter conditions.
// Set Handled to true to cause the UltraGrid to skip adding its own filter items.
e.Handled = true;
ColumnFilter cf;
for ( int i = 0; i < 10; i++ )
{
cf = new ColumnFilter( e.Column, FilterLogicalOperator.And );
int val1 = i * 100;
int val2 = ( 1 + i ) * 100;
cf.FilterConditions.Add( FilterComparisionOperator.GreaterThanOrEqualTo, val1 );
cf.FilterConditions.Add( FilterComparisionOperator.LessThan, val2 );
e.ValueList.ValueListItems.Add( cf, ">= " + val1 + " and < " + val2 );
}
}
반응형
'ETC' 카테고리의 다른 글
[ETC] Debugging Tools For Windows (0) | 2009.04.30 |
---|---|
[ETC] JQuery (0) | 2009.04.29 |
[ETC]CSS (0) | 2009.04.20 |
[ETC] Infragistics ultragrid 필요한 Property 몇가지... (0) | 2009.04.02 |
[ETC] SCSF 템플릿을 VS2008 에서도 사용하고 싶으십니까? (0) | 2009.04.02 |