Topic: hide empty rows

hi
is there anyway that an empty row in a tablegrid is not shown?

Re: hide empty rows

Hi
Can you attach an example of your project.
Derek.

3 (edited by identity 2025-04-27 09:54:59)

Re: hide empty rows

expense tab in the frmMain has empty fields

i used a script but it shows an error

Post's attachments

Attachment icon Tuition m.zip 341.21 kb, 24 downloads since 2025-04-27 

Re: hide empty rows

The error occurs due to incorrect use of the property  .Cell[1, i].
If you want to analyze a string value, you should use".Cells[1, i] = ''  or .Cell[1, i].AsString = '' .
See the component properties https://myvisualdatabase.com/help_en/sc … egrid.html .


In your case, the situation is as follows:
You want to analyze a column for which the result is displayed as a currency (floating).
In your example, the SQL query returns one value 12000 and three NULL values.
Although you see empty cells, in fact, the table internally substitutes 0 (zero). Therefore, your analysis on an empty cell will not give a result.
There can be two ways out:
1. Use the property .Cell[1, i].Empty = True for analysis in your example.
2. Create a calculated field that will output 0 instead of ZERO and then parse .Cell[1, i].AsFloat = 0 in your example.