问题描述
大家好,
我有两个表,一个是Building Master,其中包含字段(Bid,BuildingName)
另一个表是Floor Master,它具有字段(Fid,Floorname,BID).BID是显示Building master ID的外键.我是在template字段的帮助下自定义Floor Page中的gridview的.该网格视图将显示楼层所在的楼层编号,楼层名称和建筑物名称.但是在绑定过程中存在问题.实际上在楼层主表中只有建筑物ID而没有建筑物名称.因此如何在网格视图中绑定模板字段,以便将其命名为建筑物名称从Building Master表中获取,并显示在楼层"页面中,其中包含模板字段.
感谢您的问候,
Amit
Hello All,
I have two tables one is Building Master which has fields (Bid,BuildingName)
and another table is Floor Master which has fields(Fid,Floorname,BID).BID is the foreign key which shows the ID of Building master.I am customized the gridview in floor Page with the help of template field.This grid view will display Floorid,Floorname and Building Name in which that floor exist.But There is problem during Binding.Actually In floor Master Table There is only Building Id and Not Building Name.So How to Bind Template Field In grid view So That it will Brought building Name from Building Master table and will display in Floor page with template Field.
Thanks with Regards,
Amit
推荐答案
select * from FloorMaster a Left Join BuildingMaster b on
a.BID=b.Bid
这篇关于如何使用“模板"字段绑定另一个表的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!