winformtextbox⾃动检索;textbox智能选择;textbox⾃动模糊
查询;。。。
#region
AutoCompleteStringCollection cs = new AutoCompleteStringCollection();
cs.Clear();
string sql = "select colum1 from tablename where colum1 is not null";
DataTable dt = objFrmMain.ObjCDataOperation.MyDB.OpenSQL(sql);
if (dt != null && dt.Rows.Count > 0)
winform增删改查简单案例
{
foreach (DataRow dr in dt.Rows)
{
cs.Add(dr["colum1"].ToString());
}
}
#endregion
把以上内容放到load⾥⾯,适⽤于数据量⼩的查询

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。