如何在gridview中显示价值? [英] how to show value in gridview ?

查看:60
本文介绍了如何在gridview中显示价值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个名为brand(id,name,img)的表和产品(prd_id,name,brand_id).i有一个网格,其中colom是(prd_id,prd_name,brand_name)。现在我想在gridview中显示brand_name其他表品牌(brand_id)的基础?

i have two table named brand(id,name,img) and product (prd_id,name,brand_id).i have a grid in which colom are (prd_id,prd_name,brand_name).now i want to show brand_name in gridview basis of other table brand( brand_id)?

推荐答案





请写一个查询



从p.brand_id = b.id上的产品p内连接品牌b中选择p.prd_id,p.prd_name,b.name



将此数据提取到数据集并绑定到gridview。
Hi,

Please write a query

Select p.prd_id,p.prd_name,b.name from product p inner join brand b on p.brand_id = b.id

fetch this data to dataset and bind to gridview.


这篇关于如何在gridview中显示价值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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