Rank: Member Groups: Member
Joined: 4/3/2008 Posts: 16
|
I have a grid with allownewitem true and fullrowmode false. I have a Save button that saves the data to the database. When I click the save button I have javascript that executes to validate the data in the new row before the postback to make sure none of the cells in the new row are blank. When I enter text in a cell in a new row the row is created. I then click the save button but the only cell that seems to be defined is the one I entered data in. All of the rest are undefined. I have this line of code "grdRoomList.editCell(-1, 2, true);" in the save button javascript that should accept all changes in the grid. Why are the other cells in the new row not defined?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
I am not sure whether grdRoomList.editCell(-1, 2, true) has anything to do with your question, but the Grid should have null value when you have not entered anything. If you wish the cell to have a default value, you can call the client side JavaScript API to set them, or modify your server side code to save the default value into DB when the cell value is null.
Thanks!
|
Rank: Member Groups: Member
Joined: 4/3/2008 Posts: 16
|
Sorry I thought I tried testing for null and it didn't work. I was wrong. The test for null fixes the problem.
Thanks
|