必须在Gridview中显示SupplierName而不是其代码

必须在Gridview中显示SupplierName而不是其代码

本文介绍了必须在Gridview中显示SupplierName而不是其代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友,
我的数据库Table.in下拉列表中有字段名称Suppliername&Inv_id,我正在显示名称,同时在表中保存时,我使用的是与Suppliername相关的Inv_id.
但是我必须在保存到数据库表中后在gridview中显示供应商名称....我只是得到ID而不是名称.
该怎么办?

请回复,
Aamir

Hi Friends,
i have field name suppliername & Inv_id in my Database Table.in dropdownlist i am showing the name and while saving in table i am using the Inv_id related to the Suppliername.
but i have to show the suppliername in gridview after saving in Database table....i am only getting the Id not name.
what can be done?

please reply,
Aamir

推荐答案


SELECT a.billno AS [Bill no], b.sName AS [Supplier] FROM bill AS a INNER JOIN SupplierMaster AS B on a.inv_id=b.inv_id



使用此查询绑定ur网格

并让我知道您是否找到了解决方法



use this query to bind ur grid

and let me know u found the solution or not



这篇关于必须在Gridview中显示SupplierName而不是其代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-21 19:07