我有2個表:簡單顯示方法
Table: country1 - fields: CountryId ,CountryName
Table: City1 - fields: CityId, CityName, CountryId
有通過CountryId
2和表之間的關係,每個城市都有一個Country id
並且存在與單個數據源City1
和網格字段CityId,CityName, CountryId
一個形式我需要在
我design-designs-grid-methods-new
方法
display CountryName method1(City1 cit)
{
Country1 c1;
select CountryName from c1
where c1.CountryId == cit.CountryId;
return c1.CountryName;
}
創建了一個新方法網格顯示的
CountryName
代替
但當形式打開ID仍顯示爲一個ID不是CountryName
請不要建議在沒有上下文的表單上創建顯示方法,它們不可重用,並且性能可怕。 –