Kgrid 1.7 column head title disappear lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- christensen · 2011-10-01 06:33 Hi, I have a problem with displaying column head title when the query return empty. and it doesn't mater if i run again the query and return some results, the title bar disappear. only after i restart the program will come back. Code: [Select] frmsetting.qryGridMain.Close;             frmsetting.qryGridMain.SQL.Clear;             frmsetting.qryGridMain.SQL.Add('select ID_CLIENT, client_n as "Client Name", phone as "Phone No.", address as "Address" from tb_client ');             frmsetting.qryGridMain.Open;            grdClient.Cols[0].Visible:=False;            grdClient.Cols[1].Visible:=False;                                      For the moment i found a temporary solution, to check the return of the query if is empty or not. if is empty then will not populate the kgrid. Thanks ---------------------------------------------------------------------- JD · 2011-10-01 13:22 That sounds like a good enough solution to me. You only fill the grid IF the query does not return empty. Code: [Select]// Create the column headers before running the query // Code to create column headers here // Run the query if query.recordcount <> 0 then   // Fill the grid else   // Do nothing! Leave the grid as it is endif ---------------------------------------------------------------------- christensen · 2011-10-02 20:16 something similar i use to solve my problem, but i'm searching for a better/faster solution.