jQWidgets Forums
jQuery UI Widgets › Forums › Grid › jqxInput on Grid
Tagged: grid, javascript grid
This topic contains 5 replies, has 2 voices, and was last updated by mac 9 years, 8 months ago.
-
AuthorjqxInput on Grid Posts
-
Hi
I have jqxInput(editable cell) on grid.
I am unable to apply force selection on the same.
i am using createeditor to embed jqxInput, and the ‘row’ is always same(the very first edited row).
following the way i coded for force selectioncreateeditor: function (row, cellvalue, editor, cellText, width, height) { var countrySelected = false; var inputElement = $("<input/>").prependTo(editor); inputElement.jqxInput({ popupZIndex: 2000000001, source: countrySource, width:width,height:height}); inputElement.on('close', function () { if (countrySelected === false) { //rValue=''; alert("row # is always ="+row); } }); inputElement.on('open', function(){ countrySelected = false; }); inputElement.on('select', function () { countrySelected=true; }); },
full code is here https://jsfiddle.net/jhbqxhg3/1/
in the above on ‘close’ event, i’d like to check if there was a selection, if NO wanted to blank the cell.
But the ‘row’ was always first edited row.
any thing wrong there? or any better approach?Hi mac,
The function is implemented in the “createeditor” and there the “row” argument is the “row” passed by the function. The function is called 1 time when the Editor is created so the “row” is unchanged.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comThanks for the response Peter.
How can we implement force selection in jqxInput? (jqxInput is on jqxgrid cell)Hi Everyone,
Any possibilities of force selection in jqxInput(on editable cell)?
in the above code example, i managed to capture the events and figured out if jqxInput’s selection is done or not.
But i cant set the value to blank if no selection is made.
From editor can we update the value?Hi, i found a solution for this.
bind the column with cellvaluechanging eventcellvaluechanging: cellvaluechanging,
and var cellvaluechanging = function (row, datafield, columntype, oldvalue, newvalue) { if (countrySelected ) { return newvalue; } return oldvalue; }
-
AuthorPosts
You must be logged in to reply to this topic.