Datagrid & Empty rows

Jun 8, 2009 at 3:38 PM
Edited Jun 9, 2009 at 11:18 AM


i am using a datagrid with a detail view

the input is transfered to a hibernate session and then saved in the Database.

My Problem is, that the programm saves every input, even empty rows.

the check wather the input is empty or not, isn't a problem, but if the programm doesn't add anything to the datagrid, thedetail view goes buggy.

(When i activate the detail view, it jumps to the first entry in the grid and shows me its details)


without the input check, it seems to work but keeps adding empty entrys to the list and the db , which causes troubles (null pointer exceptions) later on.

did anyone have a similiar problem or knows a workaround?


thank you for your help