如何从显示成员获取组合框值成员 [英] how to get combobox value member from display member

查看:82
本文介绍了如何从显示成员获取组合框值成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的问题

我的datagridview在这里

here is my proble

my datagridview is here

PARTYNAME         AMOUNT

lakhan             2000
john               2000
smith              2000
ali                2222


各方名称是我的组合框的显示成员

现在我想将此datagridview保存在客户表中

但我不想保存聚会名称,但我想保存聚会ID,它是我的组合框的值成员

只是我想在保存datagridview的同时用聚会ID替换这个聚会名称

任何哥们都可以帮我吗



高级坦克

lakhan


All party name is display member of my combobox

now i want to save this datagridview in customer table

but not party name i want save party id which is value member of my combobox

simply i want to replace this party name by party id while save datagridview

Can any buddy help me



tanks in advanced

lakhan

推荐答案

我认为您应该使用ID而不是amt.
获取ID后,您可以从数据库或集合中检索amt.
I think you should use the ID instead of amt.
after getting the ID you can retrieve the amt from the database or collection.


这篇关于如何从显示成员获取组合框值成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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