在Combox插入“请选择”:

DataSetQueryFill(ds, "UNIT_REL_PARM", "select UNIT_CODE,ltrim(str(UNIT_CODE))+' '+UNIT_NAME as UNIT_NAME from UNIT_REL_PARM order by UNIT_CODE", null, true);
DataTable dt =ds.Tables["UNIT_REL_PARM"];

DataRow dr= dt.NewRow();
dr[0] = "0";
dr[1] = "请选择";
//插在第一位
dt.Rows.InsertAt(dr, 0);

comboBox.DataSource = dt;
comboBox.DisplayMember = "UNIT_NAME";
comboBox.ValueMember = "UNIT_CODE";

相关文章:

  • 2022-12-23
  • 2021-11-21
  • 2021-03-31
  • 2021-12-17
  • 2022-12-23
  • 2021-07-31
  • 2022-12-23
猜你喜欢
  • 2021-07-21
  • 2021-08-28
  • 2022-12-23
  • 2021-06-30
  • 2022-12-23
  • 2021-12-06
  • 2021-12-25
相关资源
相似解决方案