Dataview不过滤行-reg [英] Dataview does not filter row -reg

查看:58
本文介绍了Dataview不过滤行-reg的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的数据视图不过滤行.它仅显示列名称的原因是什么?有人可以建议我吗?

My dataview does not filter rows. What is the reason it shows column name only? Can anyone suggest me?

private void txtSearch_TextChanged(object sender, EventArgs e)
{
  DataSet ds1 = new DataSet();
  // ds.Clear();
  string[] str = { "inky", "pinky" };
  ds1 = ppt.P_DS("TBL_ITEMS_SEARCH_DELETE", str);
  // dataGridView1.DataSource = ds.Tables[0];
  DataView dv = new DataView(ds1.Tables[0]);
  dv.RowFilter ="ITEMCODE = '"+  txtSearch.Text+"'";
  this. dataGridView1.DataSource = dv;
}



谢谢



Thanks

推荐答案

您忘记了绑定数据
You have forgotten to bind the data
this.dataGridView1.DataBind();


最后如阿卜杜勒所说.
然后它将起作用.


at the end as Abdul said.
then it will work.


这篇关于Dataview不过滤行-reg的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆