Categories | Question details Back To List | ||
Submitting grid data through a form Hi I'm having a little bit of a problem with submitting grid data from one page to the next. For example, I have a grid with 10 rows and 11 columns. Since I am using "mygrid.submitOnlyChanged(false)" I want all data to be passed through regardless if it changed or not. The problem I'm having is that it passes as a value a variable holding the number of the rows. The data is initally loaded via an xml file, where the row numbers are 1-10. This data is then passed to an identical page, except that instead of reading the xml file, it reads the $_POST (using PHP) and re displays on the grid. I'm mainly try to see if there is a different between loading from xml or data from a form. So far so good. Now I go on to another page where the data being passed is coming is also coming from a form, but, which initially loaded from another form, and now there's a variable being passed holding the row numbers ("0,1,2,3,4,5,6,7,8,9"). A variable of reference I can use is the 18th variable being passed from one page to another. Here's the course of events: 1) data is initially loaded via xml file 2) data is passed to a nother page. Using PHP I reade the $_POST contents and redisplay on grid. 18th variable is the 1st cell in the grid (1st row and column). so far so good. 3) I then submit this data to another page (same exact code as the second) but now the 18th variable actually holds row numbers (0,1,2,3,4,5,6,7,8,9) is printed as the first cell, and what should have been on the first cell is shifted to the next. If I keep resubmitting the data, eventually my grid will be filled with (0,1,2,3,4,5,6,7,8,9). Why is this data being passed through? I was able to find a workaround by simply ignoring the $_POST variable that has this data in it, so this fixes the problem so the data isn't shifted by one any longer but I'm sure there some kind of explanation for this. Thanks for your help Answer posted by Support on Mar 11, 2009 02:47 How do you adding rows in grid when data taken from POST, by any chance are you using addRow for it? When grid integration with form used, grid collect lists of all added and deleted rows and submit them with cell's data ( it allows to separate updated and inserted rows ) , the value of such parameter is a comma separated list of IDs, which is very similar to your case. Behavior can be disabled by grid.submitAddedRows(false); Answer posted by Librado Sanchez on Mar 11, 2009 07:03 Yup, a few minutes after I asked the question I found out that it was the the added rows that were giving me an issue. Thanks again. |