谁帮我解决这个问题,有高分相送 你什么意思?有什么问题吗?把问题写清楚! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 删除排在最后一个元素会出错。 大哥们大姐们,帮帮忙。 改一改你的删除语句private void button2_Click(object sender, System.EventArgs e){ if(this.comboBox1.Items.Count>0) { try { int i = this.comboBox1.SelectedIndex; <------ this.comboBox1.SelectedIndex = -1; <------ this._testdate.RemoveAt(i); <------ this.comboBox1.DataSource=null; this.comboBox1.DataSource=this._testdate; this.comboBox1.DisplayMember="name"; this.comboBox1.ValueMember="id"; } catch(Exception ex) { Console.Out.WriteLine(ex.Message); } //this.comboBox1.SelectedIndex=0; }} 窗体刷新父窗体中的子窗体 请教各位:vs 2005中文版开发的应用程序改成英文版可行吗? c#中的office组件 asp.net注入问题 查找一个简单C#小程序错误 SqlParameter 能夠設定一個SQL語句函數嗎? 菜鸟求救!!!!SOS! 这个广为传送的FTP源码真的能运行吗?? C#插入数据到access数据库,第一条数据丢失 哪里能找到System.net.dll这个东东啊? 请问如何在字符串中找到指定字符的方法是什么啊 如何获取当前所添加记录的id??急!!!
private void button2_Click(object sender, System.EventArgs e)
{
if(this.comboBox1.Items.Count>0)
{
try
{
int i = this.comboBox1.SelectedIndex; <------
this.comboBox1.SelectedIndex = -1; <------
this._testdate.RemoveAt(i); <------
this.comboBox1.DataSource=null; this.comboBox1.DataSource=this._testdate;
this.comboBox1.DisplayMember="name";
this.comboBox1.ValueMember="id";
}
catch(Exception ex)
{
Console.Out.WriteLine(ex.Message);
}
//this.comboBox1.SelectedIndex=0;
}
}