本文整理匯總了C#中System.Windows.Forms.BindingSource.RemoveFilter方法的典型用法代碼示例。如果您正苦於以下問題:C# BindingSource.RemoveFilter方法的具體用法?C# BindingSource.RemoveFilter怎麽用?C# BindingSource.RemoveFilter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Windows.Forms.BindingSource
的用法示例。
在下文中一共展示了BindingSource.RemoveFilter方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: frmArticulosGenerarApartir
public frmArticulosGenerarApartir(BindingSource bindingSource)
{
InitializeComponent();
this.bindingSource = bindingSource;
bindingSource.RemoveFilter();
txtDesde.KeyDown += new System.Windows.Forms.KeyEventHandler(BL.Utilitarios.EnterTab);
txtHasta.KeyDown += new System.Windows.Forms.KeyEventHandler(BL.Utilitarios.EnterTab);
txtDesde.Enter += new System.EventHandler(BL.Utilitarios.SelTextoTextBox);
txtHasta.Enter += new System.EventHandler(BL.Utilitarios.SelTextoTextBox);
txtDesde.KeyPress += new System.Windows.Forms.KeyPressEventHandler(BL.Utilitarios.SoloNumeros);
txtHasta.KeyPress += new System.Windows.Forms.KeyPressEventHandler(BL.Utilitarios.SoloNumeros);
}
示例2: GenericEditAction
public bool GenericEditAction(IEditable _geditForm, BindingSource actualActions, BindingSource groupHeadersList, bool isNew = false)
{
ulog = UserLog.Instance;
try
{
DataRowView actionDataRowView;
actionDataRowView = (isNew == false) ? (DataRowView)actualActions.Current : (DataRowView)actualActions.AddNew();
if (actionDataRowView == null)
throw new Exception("Нет записей для редактирования.");
using (IEditable editActForm = _geditForm)
{//открываем форму и сохраняем изменения
if (editActForm.ShowDialog() == DialogResult.OK)
{
actualActions.EndEdit();
return true;
}
else
{
actualActions.CancelEdit();
return false;
}
}
}
catch (Exception ex)
{
actualActions.CancelEdit();
ulog.Message(ex.Message, UserLogMessageLevel.Error);
return false;
}
finally
{
groupHeadersList.RemoveFilter();
groupHeadersList.Filter = "[InList] = 1";
}
}
示例3: txbBuscaNome_KeyUp
private void txbBuscaNome_KeyUp(object sender, KeyEventArgs e)
{
BindingSource bs = new BindingSource();
bs.DataSource = dvgOperadores.DataSource;
if (txbBuscaNome.Text != string.Empty)
bs.Filter = "nome like '%" + txbBuscaNome.Text + "%'";
else
bs.RemoveFilter();
dvgOperadores.DataSource = bs;
}
示例4: txbBuscaNome_KeyUp
private void txbBuscaNome_KeyUp(object sender, KeyEventArgs e)
{
BindingSource bs = new BindingSource();
bs.DataSource = dgvProdutos.DataSource;
if (txbBuscaNome.Text != string.Empty)
bs.Filter = "descricao like '%" + txbBuscaNome.Text + "%'";
else
bs.RemoveFilter();
dgvProdutos.DataSource = bs;
}
示例5: textBoxSuchenTextChanged
// Tim
/************************************************************************************************************************************/
/* public void textBoxSuchenTextChanged(DataGridView dataGridView, ComboBox comboBox, TextBox textBox, BindingSource bindingSource) */
/************************************************************************************************************************************/
/* Wenn sich er TextBox Text geändert haben sollte, wird der Filter angepasst */
/************************************************************************************************************************************/
public void textBoxSuchenTextChanged(DataGridView dataGridView, ComboBox comboBox, TextBox textBox, BindingSource bindingSource)
{
string suchen = "";
if (String.IsNullOrEmpty(textBox.Text)) // Wenn leer dann suchen Filter entfernen
{
bindingSource.RemoveFilter();
}
else // Nach irgendwas suchen
{
suchen += dataGridView.Columns[comboBox.SelectedIndex].HeaderText.ToString();
suchen = "Convert([" + suchen + "], 'System.String') LIKE '*{0}*'";
}
bindingSource.Filter = string.Format(suchen, textBox.Text);
}