- Sat Aug 19, 2017 12:42 am
#794620
Hello everyone,
What could be the best way to insert / delete a row in the middle of a Grid, when the add or delete options are disabled in a Grid for some reason?
I use the current method now:
For adding after row n:
a) Copy all rows of mygrid to tempgrid
b) Clear all rows of mygrid
c) Restore first 'n' rows from tempgrid into mygrid
d) Add a row in mygrid
e) Restore remaining rows from tempgrid into mygrid
For deleting row n:
a) Copy all rows of mygrid to tempgrid
b) Clear all rows of mygrid
c) Restore first 'n - 1' rows from tempgrid into mygrid
d) Restore remaining rows from 'n + 1' onwards from tempgrid into mygrid
Best wishes,
SGK
What could be the best way to insert / delete a row in the middle of a Grid, when the add or delete options are disabled in a Grid for some reason?
I use the current method now:
For adding after row n:
a) Copy all rows of mygrid to tempgrid
b) Clear all rows of mygrid
c) Restore first 'n' rows from tempgrid into mygrid
d) Add a row in mygrid
e) Restore remaining rows from tempgrid into mygrid
For deleting row n:
a) Copy all rows of mygrid to tempgrid
b) Clear all rows of mygrid
c) Restore first 'n - 1' rows from tempgrid into mygrid
d) Restore remaining rows from 'n + 1' onwards from tempgrid into mygrid
Best wishes,
SGK