Reputation: 1114
Here issue is in the kendogrid column menu filter is not having limit to filter i don't need the negative value .In second image while enter the arrow it's going negativeve values how to restrict the negative value?
Upvotes: 7
Views: 4612
Reputation: 30671
Use the filterMenuInit event of the grid. Then find the numeric textbox and set its min value to 0 using the min method. Here is a sample implementation:
<div id="grid"></div>
<script>
$("#grid").kendoGrid({
dataSource:{
data: [
{ name: "Jane Doe", age: 30 },
{ name: "Jane Doe", age: 33 }
],
schema: {
model: {
fields: {
age: { type: "number" }
}
}
}
},
filterable: {
extra: false
},
filterMenuInit: function(e) {
var numeric = e.container.find("[data-role=numerictextbox]").data("kendoNumericTextBox");
if (numeric) {
numeric.min(0);
}
}
});
</script>
And a live demo: http://jsbin.com/itiwos/1/edit
Upvotes: 8