Search the list inside data
Search the list inside data
bearV1
Posts: 2Questions: 1Answers: 0
The question is, how can i search the data, when the td is select list ?
here is my code
{
mData: 'Status',
mRender: function (data, type, result) {
var $select = $("<select></select>", {
}), $value = [{
text: 'Yes',
value: 0,
}, {
text: 'No',
value: 1,
}];
$($value).each(function (i, val) {
var option = $('<option></option>', {
'text': val.text,
'value': val.value,
'selected': data == val.value ? 'selected' : false
});
$select.append(option);
});
return $select.prop('outerHTML');
}
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Any solution better than this ?
```
return $select.prop('outerHTML') +
<span hidden>${data}</span>
;Hi @bearV1 ,
This thread should help, it's asking the same thing.
Cheers,
Colin