本文整理汇总了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);
}