I have 2 tables:
Table: country1 - fields: CountryId ,CountryName
Table: City1 - fields: CityId, CityName, CountryId
There is a relation between 2 tables through the CountryId, each city has a Country id and there is a form with single datasource City1
and grid with fields CityId,CityName, CountryId
I need to display a CountryName instead of CountryId in the grid
I created a new method in design-designs-grid-methods-new methods
display CountryName method1(City1 cit)
{
Country1 c1;
select CountryName from c1
where c1.CountryId == cit.CountryId;
return c1.CountryName;
}
but when form open the id still shows as a id not a CountryName