Hi
I have a datagrid with enabled filter
<script type="text/javascript">
$(function(){
var dg = $('#dg').datagrid();
dg.datagrid('enableFilter', [{
field:'dia',
type:'text',
},{
field:'sala',
type:'text',
},{
field:'inicio',
type:'combobox',
options:{
panelHeight:'auto',
data:[{value:'',text:'Livre'},{value:'P',text:'Ocupado'}],
onChange:function(value){
if (value == ''){
dg.datagrid('addFilterRule', {
field: 'inicio',
op: 'equal',
value: value
});
} else {
dg.datagrid('addFilterRule', {
field: 'inicio',
value: not null
});
}
dg.datagrid('doFilter');
}
}
}]);
});
and the fields
<th field="dia"width="150" sortable="true">Dia</th>
<th field="sala" width="150" sortable="true">Sala</th>
<th field="inicio" width="150" sortable="true">Tempos Alocados</th>
How to get value from not null beacuse my db has null and not null values
regards