Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Thulasi on Nov 19, 2008 06:56
open dhtmlx forum
DHTMLXGrid cell value after editing

I am using a dhtmlxgrid with a Amount Column, where the users can enter an amount. I also attached an event "onEditCell", and in Stage 2 of this event I am checking if the value entered into the cell is a valid number or not, and if it is a valid I am adding all the values in this column to populate the Total Amount text field underneath this grid. This event fires when the user tabs or mouse over to another field on the form. However, if the user clicks a button using a mouse after entering a value in the Amount cell, the "onClick" event of the button is firing first before "onEditCell" stage 2 is fired. I would like to add the Amount column before other events are fired.

Is there any work around for this?

Thank you,
Thulasi
Answer posted by Support on Nov 19, 2008 08:45
You can call 
    grid.editStop()
directly from button onclick event, it will force current editor closing and all relating events processing. 
Answer posted by Tejas Shah on Dec 04, 2008 03:00
Hi there,

I have some lines of code written in onEditCell event.
Will that execute after using grid.editStop() ?????
I want that code to be executed after calling editStop(). How it can be done ?
Answer posted by Support on Dec 04, 2008 03:28
If you have some cell in edit state, after calling grid.editStop , onEditCell event will be triggered and related code called. 
If you have not cell in edit state, calling of grid.editStop will not trigger any events.