Welcome Guest Search | Active Topics | Sign In | Register

Grid New Row Cells Not Defined Options
Jeff
Posted: Monday, July 20, 2009 1:05:06 PM
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?
eo_support
Posted: Monday, July 20, 2009 1:13:06 PM
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!
Jeff
Posted: Monday, July 20, 2009 1:32:45 PM
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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.