I have DBGrid, but not all fields I can see inside Grid (TdxDBGrid) Was adding three new fields(red V) to qPassengers and I don't see those values. Here is part of query for DBGrid
SELECT * from Workers left outer join Map on Workers.id = Map.WId
Workers.DecodedStreet AS Street,
Workers.DecodedHouseNumber AS StreetNum,
Workers.DecodedCity AS City,
ISNULL(Map.DecodedStreet,'') AS DStreet, // new field
ISNULL(Map.DecodedStreetNum,'') AS DStreetNum, // new field
ISNULL(Map.DecodedCity,'') AS DCity // new field
and after that with property SummaryGroups I placed new fields to my Grid, BUT I didn't find any New fields in property FieldName, that connecting fields from query with column in DBGrid
For example So I can't find corresponding field in FieldName for column dbGridTableDStreet, because DStreet absent in FieldName list, BUT present in the query qPassengers
*Compile and Build was done *
CodePudding user response:
Your grid is using data taken from 'qPassengers' dataset. If this dataset is using persistent fields, then adding the fields to the query of the dataset is not enough to make them visible. The new fields must first be added to the persistent fields collection of the 'qPassengers' dataset. Click with your right mouse button on the 'qPassengers' dataset and open the fields editor to do so.