将组合框添加到datagrid以显示数据表值... [英] Add combo box to datagrid to display data table value...

查看:57
本文介绍了将组合框添加到datagrid以显示数据表值...的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的数据库表有一个字段"staus",其中包含a)所请求,b)待定,c)确认的3​​个值中的任何一个.我使用taableadapter&typed datatable在gridview中显示该表的数据. (我的表适配器数据集仅适用于单个表).当我将数据从数据库加载到网格时,它应显示状态"字段以及DB中带有其他2个选项的值.再次,我想在网格中的组合中显示此状态,并选择状态"字段的DB值...即网格中的status字段应显示所有3个选项,并且DB中的值具有默认选择.

另外,由于我的目标是拥有最少的数据库访问权限,所以我不能包含查询命中数据库的命令...命中我的数据集的任何代码都可以......

任何人都可以建议实现此目标的某些选择....

在此先感谢
Nishitha

My DB table has a field "staus" which holds any of the 3 value a)requested, b)pending, c)confirmed. i display the data of this table in a gridview using taableadapter& typed datatable. (My table adapter dataset is for a single table only). When i load data from database to grid, it should show the "status" field with the value in DB with other 2 option. again I want to display this in a combo in my grid with the DB value for "status" field selected...i.e. status field in grid should have all 3 option displayed with the value in DB having default select.

Also as my target is to have minimum DB access, i cannot include queries to hit DB... any code that hits my dataset is fine....

Can anyone suggest on some option to achieve this....

Thanks in advance
Nishitha

推荐答案

希望 DataGrid中的组合框 [ ^ ]这对我有帮助.
Hope ComboBox in a DataGrid[^] this my help you.


这篇关于将组合框添加到datagrid以显示数据表值...的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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