Filter Field Preview Format Not Working

0 Answers 39 Views
Filter
Headygains
Top achievements
Rank 1
Veteran
Headygains asked on 07 Sep 2023, 08:34 PM

I'm experiencing an issue that I've had a couple times utilizing the kendo UI libraries with formatting.

It seems that the formatting commands are not the same throughout the library, and as well there is limited documentation on PreviewFormatting.


 @(Html.Kendo().Filter<OrderSearchBindingModel>()
.Name("filter")
.ApplyButton()
.ExpressionPreview()
.MainLogic(FilterCompositionLogicalOperator.Or).Fields(f =>
  {
      f.Add(p => p.InternalOrderId).Label("Order ID").PreviewFormat("n");
      f.Add(p => p.ExternalOrderId).Label("EX Order ID");
}).FilterExpression(fe =>
  {
      fe.Add(p => p.InternalOrderId);
}).DataSource("source"))

I have tried the following formats with no success I'm simply trying to achieve a raw numerical value no commas, or decimals.

n

n0

#

#############

Is there documentation pointing to this specific formatter and it's options?

Patrice Cote
Top achievements
Rank 1
commented on 06 May 2024, 06:55 PM

Did you find the information? There is clearly not enough documentation about this PreviewFormat property.

I have a similar problem with a field that is bound to a DropdownList and I get [object Object] in the ExpressionPreview. The value field is a string, not numeric at all. We use it for a .Contains filter.

No answers yet. Maybe you can help?

Tags
Filter
Asked by
Headygains
Top achievements
Rank 1
Veteran
Share this question
or