InMethod Grid can't delete my row object and adding a new row has problems

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

InMethod Grid can't delete my row object and adding a new row has problems

ColinMC
For my project, I added InMethod's Grid and the data grid looks like this



Sorting works, adding a new object into my database works, updating works, cancel reverts any changes not saved, and paging works.

My problem is when you click the "add new item" button it adds a new row to the data grid but the row is 3px in height. I fixed it by adding default data to a column. After doing that, clicking the button again without saving the new row it creates another new row but it is not displayed. Does anyone know how to properly implement this feature I am using AddRecordToolbar to insert new rows?

My second problem is deleting a row from the data grid, which also deletes a record from the database. I am using the AddDeleteColumn and when I click the delete button, I cast the rowModel object to what I want and call a method I create to delete it from the database. Then I call super.onDelete to delete it from the data grid. Deleting the object from the database does not work for some reason and my methods work for deleting objects because I unit tested them. My next question is has anyone properly implemented deleting a row with this Grid?

Any help would be much appreciated, I spent 3 days trying to implement this component.