本帖最后由 sdjkxhb 于 2009-08-01 12:33:15 编辑

解决方案 »

  1.   

    ListBoxItemValue newItem = new ListBoxItemValue(Convert.ToString(rowManager["name"]).PadRight(10) + "    " + Convert.ToString(rowManager["job"]), Convert.ToInt32(rowManager["id"])); --------------------------------------
    似乎没有看到加入ArrayList的代码。
      

  2.   

    Listbox1.DataSource = ListBoxItems; 
    Listbox1.DisplayMember = "LongName"; 
    Listbox1.ValueMember = "IntValue"; 
    把ListBoxItems绑定给DataSource ,再执行下面两句时,会报错,说DisplayMember 的显示列已经是IntValue了,不能再把IntValue赋给ValueMember 
    就这个问题
    好久没想出什么原因
      

  3.   

    少了一句ListBoxItems.add(ListBoxItemValue );