xtragrid 某个值 查找_关于第三方控件DevExpress中XtraGrid用法,动态邦定数据

DataTable data = DAL.XXDA.EDIT.spda.get("SelectAll", "", "", "", "", "", "", "", "", "", "

", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "");

//创建一个新列

DevExpress.XtraGrid.Columns.GridColumn con = new DevExpress.XtraGrid.Columns.GridColumn();

con.FieldName = "item_no";//对应邦定的数据源名称

con.Name = "编号";

con.Caption = "编号";//显示给用户的名称

con.Visible = true;

con.VisibleIndex = 0;//显示列的位置

this.gridView1.Columns.Add(con);

con = new DevExpress.XtraGrid.Columns.GridColumn();

con.FieldName = "barcode";

con.Name = "条形码";

con.Caption = "条形码";

con.Visible = true;

con.VisibleIndex = 1;

this.gridView1.Columns.Add(con);

con = new DevExpress.XtraGrid.Columns.GridColumn();

con.FieldName = "item_name";

//con.Name = "商品名称";

con.Caption = "商品名称";

con.Visible = true;

con.VisibleIndex = 2;//

this.gridView1.Columns.Add(con);

//邦定

this.gridControl1.DataSource = data;

//设置行标题的宽度

gridView1.IndicatorWidth = 60; //获取单元格的值

string str=this.gridView1.GetRowCellDisplayText(0, this.gridView1.Columns[0]);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值