Thursday, October 30, 2014

DevExtreme - Get dxTextBox value the JQuery way

Fairly simple. Let's say you have this:
<div id="batch-id"></div>
Which is converted to a dxTextBox:
$('#batch-id').dxTextBox();
And you want to get the value the official way:
var x = $('#batch-id').dxTextBox('instance').option('value');
You can set the value this way:
$('#batch-id').dxTextBox('instance').option('value', 666);
You can also directly query the element using classic jQuery:
$('#batch-id input').val();

1 comment:

Unknown said...


Thank you , very helpful