Hi, I' trying to change the format of the filter of a decimal column to Int. The column is Btch_num (it's a decimal column), when I click on the filter, it shows me decimals (when I write 33, it transforms it to 33,000). I tried to configure it with Filterable(), but It doesn't work. This is my code :
@(Html.Kendo().Grid<PRR405.ViewModels.BatchViewModel>(Model.LotsOuverts)
.Name("LotsOuvert")
.Columns(columns =>
{
columns.Bound(p => p.Post_date).Title(PRR405.Resources.OpenLot.OpenLot.DateDOuverture).Format("{0: yyyy/MM/dd}").Width(150).Filterable(f => f.UI("DatePickerFormated"));
//columns.Bound(p => p.Btch_num).Title(PRR405.Resources.OpenLot.OpenLot.NumLotPRR).ClientTemplate(@"<a href='/ResumeLot/ResumeLot?btchNum=#: Btch_num #'>#: Btch_num #</a>").Width(170);
columns.Bound(p => p.Btch_num).Title(PRR405.Resources.OpenLot.OpenLot.NumLotPRR).Format("n0").Filterable(filter => filter.Cell(c => c.Template("IntegerFilter"))).Template(o => Html.ActionLink(o.Btch_num.ToString(), "ResumeLot", "ResumeLot", new { btchNum = o.Btch_num}, null)).Width(170);
columns.Bound(p => p.Comp_num).Title(PRR405.Resources.OpenLot.OpenLot.Assureur).Width(110);
columns.Bound(p => p.Br_cd).Title(PRR405.Resources.OpenLot.OpenLot.SuccursaleLabel).Width(120);
columns.Bound(p => p.Batch_cd).Title(PRR405.Resources.OpenLot.OpenLot.CodeDeLot).Width(120);
columns.Bound(p => p.Entry_Date_Formated).Title(PRR405.Resources.OpenLot.OpenLot.DateInscription).Width(160);
columns.Bound(p => p.Batch_type_Name).Title(PRR405.Resources.OpenLot.OpenLot.TypeDeLot).Width(140);
columns.Bound("").Title(PRR405.Resources.OpenLot.OpenLot.ImprimerResume).Template(o => Html.ActionLink(PRR405.Resources.OpenLot.OpenLot.Imprimer, "PrintLot", "OpenLot", new { btchNum = o.Btch_num }, null)).Filterable(false);
//columns.Bound("").Title(PRR405.Resources.OpenLot.OpenLot.ImprimerResume).ClientTemplate(string.Format(@"<a href='/OpenLot/PrintLot?btchNum=#: Btch_num #'>{0}</a>", PRR405.Resources.OpenLot.OpenLot.Imprimer)).Filterable(false);
})
.Scrollable(s => s.Height("100%"))
.HtmlAttributes(new { style = "max-height: 333px; margin-bottom:20px;" })
.Sortable()
.Scrollable()
.Filterable(f => f.Extra(false).Operators(o => o.ForString(str => str.Clear().IsEqualTo(PRR405.Resources.Shared.Shared.GridFiltre_EstEgaleA).IsNotEqualTo(PRR405.Resources.Shared.Shared.GridFiltre_NestPasEgaleA))))
.Resizable(resize => resize.Columns(true))
<script type="text/javascript">
function IntegerFilter(args) {
args.element.kendoNumericTextBox({ format: "#", decimals: 0});
}
</script>
Thank you