Categories | Question details Back To List | ||
Add row to grid via dialog or form? It seems you have a very nice infrastructure in place for adding data to the grid and the database and keeping Primary Key in sync, as you have already explained in my last question to you titled "dhtmlxgrid" on Jan 21, 2008 20:01. I have a follow-on quesiton. I have a hard requirement to validate data before I add it to a grid, and would like to do so via a form on the same page, or via a popover that displays the html form and locks out the rest of the page (i.e. greybox). I do not want to add an empty row to the grid first, then add the data directly in the grid row and validate there .... it is just not the right "flow" for my application - I really need a form to enter data for a new row, whether on the same page or via popover (greybox) that gathers the data. Is there a way to do such a thing easily in your current infrastructure? thanks, Jeremy Savoy Answer posted by Support on Jan 23, 2008 06:49 The grid itself has not such ability ( while it sounds as useful addtion, and may be implemented in next versions ), so you can use any kind of custom form and just add data from it to grid by addRow command, in such case all validataion and inputs for data must be created as custom code. Answer posted by Jeremy Savoy on Jan 23, 2008 07:02 So then, does the addRow function also take care of adding the data to the database, and updating the grid row with the primary key created by the database -- all in the same manner as if you added the row and data directly to the grid? I will look at the API documentation for addRow while I await your response. Thanks !! Answer posted by Support on Jan 23, 2008 09:32 >>all in the same manner as if you added the row and data directly to the grid Yes, the call of addRow will trigger dataProcessor and row will be marked as changed and based on used auto-update mode it will be sent to server immideatly or after dataProcessor.sendData(); command |