本文整理汇总了C#中System.Windows.Forms.BindingSource.RemoveAt方法的典型用法代码示例。如果您正苦于以下问题:C# BindingSource.RemoveAt方法的具体用法?C# BindingSource.RemoveAt怎么用?C# BindingSource.RemoveAt使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Forms.BindingSource
的用法示例。
在下文中一共展示了BindingSource.RemoveAt方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DelAllRec
void DelAllRec(ref BindingSource objx)
{
while (objx.Count > 0)
{
objx.RemoveAt(0);
}
}
示例2: PopularAbaBeneficio
public void PopularAbaBeneficio(
DataGridView beneficioGrid,
DataGridViewComboBoxColumn tipoBeneficioColumn
)
{
beneficioGrid.AutoGenerateColumns = false;
BindingSource bs = new BindingSource();
bs.DataSource = ClienteAtivo.Beneficios;
bs.AddingNew += (sender, args) =>
{
if (beneficioGrid.Rows.Count == bs.Count)
{
bs.RemoveAt(bs.Count - 1);
}
};
beneficioGrid.DataSource = bs;
TiposBeneficio.Atualizar += () => {
tipoBeneficioColumn.DataSource = TiposBeneficio.Listar().Cast<TipoBeneficio>().ToList();
};
tipoBeneficioColumn.DataSource = TiposBeneficio.Listar().Cast<TipoBeneficio>().ToList();
tipoBeneficioColumn.DisplayMember = "Descricao";
tipoBeneficioColumn.ValueMember = "Self";
beneficioGrid.DataError += new DataGridViewDataErrorEventHandler(beneficioGrid_DataError);
}
示例3: PopularAbaContato
public void PopularAbaContato(
DataGridView contatoGrid
)
{
contatoGrid.AutoGenerateColumns = false;
BindingSource bs = new BindingSource();
bs.DataSource = ClienteAtivo.Contatos;
contatoGrid.DataSource = bs;
bs.AddingNew += (sender, args) =>
{
if (contatoGrid.Rows.Count == bs.Count)
{
bs.RemoveAt(bs.Count - 1);
}
};
}
示例4: DeleteAll
public static void DeleteAll(BindingSource data)
{
while (data.Count > 0) data.RemoveAt(0);
}