列表框刷新()在c# [英] listbox Refresh() in c#

查看:163
本文介绍了列表框刷新()在c#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

int[] arr = int[100];
listBox1.DataSource = arr;
void ComboBox1SelectedIndexChanged(object sender, EventArgs e)
{
    .....//some processes
    listBox1.DataSource = null;
    listBox1.DataSource = arr;
}

is not working,



此外,

also,

listBox1.Refresh(); is not working,



此外,

also,

listBox1.Update(); is not working,





I知道我可以使用的BindingList< T> 但我有只阵列工作

你能帮助我,我怎么能刷新列表框

can you help me how can i refresh listbox?

推荐答案

请尝试以下

listBox1.DataBind()

这篇关于列表框刷新()在c#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆