When you place a dbgrid on your form, it creates 2 rows by default (a title row which is fixed and a normal row which is not fixed) My question is if there is a way to remove this 2nd normal row at runtime (leaving only the fixed title row) unless there is actually data to populate the row and in that case it should be shown of course.
For example, if I run a query that returns 0 results when my form is created, I would like only to show the title row, but if the query returns a result show the title row and all the rows that contain data like normal.
Any help would be appreciated.
procedure TForm1.SQLQuery1AfterOpen(DataSet: TDataSet); begin DBGrid1.Visible := not SQLQuery1.IsEmpty; end;- Abelisto