| Wijmo Team Member | rex posted on June 7, 2012 at 9:12 am if i wanna use a textbox as text filter, once the user keypressed, the datasource will filter the data and shown on datagrid, how can i do that? thanks | |
| Wijmo Team Member | sergeys posted on June 9, 2012 at 1:48 am This is only possible if an external editor of filter values is used (text box):
$(‘#demo’).wijgrid({
columns: [
{ filterOperator: 'Contains' }
],
data: [['a'], ['b'], ['c']],
ready: false,
loading: function (e) {
$(e.target).wijgrid(‘option’, ‘ready’, false);
},
loaded: function (e) {
$(e.target).wijgrid(‘option’, ‘ready’, true);
}
});
$(‘#textBox’).keyup(function (e, args) {
var grid = $(‘#demo’).data(‘wijgrid’);
if (grid.options.ready) {
grid.columns()[0].option(‘filterValue’, $(e.target).val());
}
});
| Answer |
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.