I use a grid control for display some information
control is fed with data from a table and can be variable
between every operation I empty the grid
but on some occasions is fine and sometimes not
remain 1 o 2 lines
i use next code to empty
mconst:=conspag.Grid_1.ItemCount
for t=1 to mconst
conspag.Grid_1.DeleteItem(t)
next
sorry for my bad english
Help whit grid
Moderator: Rathinagiri
- Rathinagiri
- Posts: 5482
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: Help whit grid
First of all we have a special method to delete all items, so, you can use,
conspag.Grid_1.deleteallitems()
In the case of your example, once you delete the first item, second item becomes the first item! So, that will be a problem.
The correct logic would be
mconst:=conspag.Grid_1.ItemCount
for t= mconst to 1 step -1
conspag.Grid_1.DeleteItem(t)
next
conspag.Grid_1.deleteallitems()
In the case of your example, once you delete the first item, second item becomes the first item! So, that will be a problem.
The correct logic would be
mconst:=conspag.Grid_1.ItemCount
for t= mconst to 1 step -1
conspag.Grid_1.DeleteItem(t)
next
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
Re: Help whit grid
Tanks rathingari
i don't find about deleteallitems() info
i check my documentation probably is bad o old
thanks again for your help
i don't find about deleteallitems() info
i check my documentation probably is bad o old
thanks again for your help