How to commit DataTable editor to the data immediatelty

edited October 2017 in Technical questions

I have a datatable with a column that uses a "text" editor. I have a button at the bottom of the grid that users will click when finished editing all rows in the column. I then attempt to loop through the rows in the datatable's data object to make sure the users filled in a valid entry for each row.

However - whatever row the user last modified does not match what's in the datatables data object the first time the button is clicked. It editor does not appear to get the underlying data updated until the second time the button is clicked.

What datatable method can I use to force the editor to commit the datatable editors text to the underlying data immediately. I have tried


as well as setting focus to another element on the page. Nothing gets that entry to appear in the underlying data on first button click.


  • edited October 2017

    For clarity - data is the id of my datatable - here is how that is configured:

    userPicksEdit = {
          id:"data", view:"datatable", 
          headerRowHeight: 30, borderless:true, 
                {id:"Sequence", header:"Entry", adjust:"header"},
                {id:"Exclude", header:"", template:"{common.checkbox()}", width:30}, 
                {id:"YourRank", header: "Rank", adjust:"header", editor:"text"}
          data:userpics,  editable: true,
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!