Categories | Question details Back To List | ||
How to use dataprocesser for saving hidden value of combo. Hi Alex, I am using dataprocesser for storing grid values into the database. My grid has two combos and along with other values of grid, I need to pass the value(which is hidden) of combo through the dataprocesser for saving. Following code I am using for saving grid data. function save(){ Could you please let me know how to do this. Thanks and Regards, Pravu Mishra. Answer posted by Alex (support) on Jul 21, 2009 06:39 Hello Pravu, how do you implement these two combos ? If you use "combo" excell, the values are passed to server correctly as well as other values of changed rows. If you initialize combos in some containers that are placed inside grid cells, you should use onChange event of the combo. You can set userdata or the row with combo with the selected value: combo.attachEvent("onChange",function(){ grid.setUserData(id,"combo_value",combo.getActualValue()) dp.setUpdated(id.true) /*marks row as updated*/ }) Answer posted by Pravu Mishra on Jul 22, 2009 06:33
Hi Alex, Following is part of my code. Header StringBuffer out= new StringBuffer("");
public String fetchCategoryCombo()throws ClassNotFoundException, SQLException{ while (rs.next()){ data part of xml rows for combo if(rs.getString("category_desc") != null) For this code the combo works. But the problem now is hidden value does not get passed if there is no click happened on the combo. If you click on the combo and select any value then the hidden value gets passed. Could you please assist and provide your suggestion. thanks and regards, pravu Mishra. Answer posted by Alex (support) on Jul 22, 2009 07:15 Hello, the Data Processor only sends data for changed rows. When you open editor and select new option, the grid value is changhed and data is sent to the server. In order to send to the server the data from a certain row (chnaged or nor) you can use setUpdated method: dp.setUpdated(rowId,true); dp.sendData(); |