不行
bb = UserGrid[row , 4].ToString().Trim() + " " + "%";
int aa = UserGroupBox.FindString(bb , 0);
结果aa=-1

解决方案 »

  1.   

    int La = aa.Length;
    str.SubString(0,La)==aa;
      

  2.   

    假设有dataSet11已经实例化了,不知道你说的是不是这个意思啊
    ArrayList list=new ArrayList();
    foreach(DataColumn col in this.dataSet11.Tables[0].Columns)
    {
    int index=col.ColumnName.IndexOf("aa");
    if(index>=0&&index<col.ColumnName.Length)
    {
    list.Add(col);
    }
    }
      

  3.   

    试试这个吧:
    % 多个字符
    _ 单个字符在你的SQL语句中加上上面的符号
      

  4.   

    现在是这样的
    string bb;
    bb = ?;      这个变量如何写?变量cc中要求找到aa打头的那个选项     
    int cc = UserGroupBox.FindString(bb , 0);
    UserGroupBox.SelectedIndex = cc;
      

  5.   

    解决了,最后是遍历ComboBox中的选项