Hi, i’ve some questions, i have two grids, grid A contains 3 columns, (img, str, str) and i fill this grid with a mySQL database, in my grid B i’ve again 3 columns (img,ed,str), here are my quiestions
When i drag and drop an element from grid A into grid B, how can i do to put only the last 2 columns (or indicate what columns i need) of grid A into grid B, in order to edit some data, or how can i pass all the data of one column in blank? it’s possible?
Can you provide me some example of usign dataprocessor in grid B?, i want to save the data in grid B, but i don’t know exactly in what event call the dataprocessor, i think that is something like “onAfterDrop”, any idea?
You should create separate instance of DataProcessor for grid B. It will monitor changes in grid B and send requests to the server side if necessary. If case of drag-and-drop when you drop item to the grid B, “inserted” or “updated” action type will be fired.
You should note the dataprocessor detects the row changed only by edit operations. If a row was changed by a direct API calling it will not be updated. You can manually call the dataprocessor to inform about the update operation:
grid.cells(id,ind).setValue(new_one)
dp.setUpdated(id,true);
but i don’t know exactly in what event call the dataprocessor, i think that is something like “onAfterDrop”
You can use “onDrop” event. This event occurs when drag-and-drop operation is finished
what do you mean with “was changed by a direct API calling”
DataProcessor update is not calling if you are changing cell value with setValue() method.
but it doenst work for the first time that i drop into grid B, any ideas
You should define grid B DataProcessor instance outside “onDrop” event handler.
DataProcessor update is not calling if you are changing cell value with setValue() method.
ok, i understand
You should define grid B DataProcessor instance outside “onDrop” event handler.
yep, i got it, but now when i drag items fron grid A into grid B everything is fine, and when i edit too, my dataprocessor does the action, “insert” , “update” , “delete”, but sometimes when i want to delete all the items that i put on grid B, the grid only underline the row and the row doesnt disappears, any ideas?
i checked it with the firebug and the dataprocessor fires correct and the query to, i.e, the items doenst appears in my database.
Please check if you are using latest version of dhtmlxDataProcessor. If issue still occurs please create ticket at support.dhtmlx.com/ and provide us any kind of sample where we can reproduce this issue.
hi, i got the last version of dataprocessor.js and now everything works fine, but now, i have one question about dataprocessor, how can put dataprocessor initialization without an url?
i mean, i have 3 combos and my dataprocessor url recieves a parameters (depens on combos values), but, for instance, if i want to change some combo value, and select another possible value, i need to pass this value into the dataprocessor url, in this point i think that i’m initializing two dataprocessors, when i click on “submit” i read the combos values and i do something like
myDataProcessor = new dataProcessor("./dataprocessor_equivalencias.php?cliente="+x[0]+"&org="+org_value+"&sec="+sec_value);
so, how can avoid this?
thanks in advance for your responses
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan