I am struggling to understand why the i cant successfully completely remove a row from the data grid only if it is the last row remaining.
I have a button in the row template "deletes row" :
Code: Select all
on mouseUp
put the dgHilitedLines of group "DataGrid 1" into theLine
dispatch deleteLIne to group "DataGrid 1" with theLine
end mouseUp
Then the handler in the behavior script like so :
Code: Select all
on deleteLIne theLine
lock screen
set the dgDataOfLine[theLine] of me to empty
unlock screen
end deleteLIne
But when i try and delete the last row, it does not re-draw the form, so still displays the last rows info.
I can tell it's a not refreshing the form after trying to delete the last row, as i have a test button, outside the grid with this code in that will clear that hanging old data from the last row entry :
Code: Select all
on mouseUp
dispatch RefreshList to group "DataGrid 1"
end mouseUp