Hi! I have a Kendo UI Filter with a column bound with a DropDownList. Everything works fine, except the ExpressionPreview gives me "[object Object]". I read that I could use the PreviewFormat, but I have no clue about how that works if it's not for numeric values. Your documentation is very thin about the subject. Can you tell me how could I see the property set as DataTextField in the preview? Or at least the DataValueField.
My razor looks like :
@(Html.Kendo().Filter<OrderSearchBindingModel>()
.Name("filter")
.ApplyButton()
.ExpressionPreview()
.MainLogic(FilterCompositionLogicalOperator.Or).Fields(f =>
{
f.Add(x => x.Symbole).Label("My values list").Operators(c => c.String(x =>
x..Contains("Contient")).EditorTemplateHandler("getSymboleList")
}).DataSource("source"))
And the script containing the dropdown logic is like this :
.kendoDropDownList({
dataTextField: "SymboleDisplayName",
dataValueField: "Symbole",
dataSource: {
type: "json",
transport: {
read: "https://myodataurl.com/symbols/getSymbols"
},
schema: {
data: "value"
}
}
});
Note that my datasource is an OData query, so I defined a schema with data: "value" in my kendo.data.DataSource object as well as type: "json". The type is aslo specified in the transport.read preperties datatype: "json"
Hi I'm attempting to repeat a vehicle (year/make/model) set of cascading dropdown lists in a component that would result in up to 3 vehicle selectors on the same form. Running into issues as the ddls have the same ids. I've been playing around with appending counters to the name etc but running into the issue where the last set of ddls gets the data. Wondering
1. If there is a working example of this scenario
2. If it is possible to pass a value to the filter function
Thanks.
Hi Team,
I am using Kendo UI MVC Grid and trying to override the checkbox style using FontAwesome fonts. I thought of doing it through CSS alone but since we can't select parent selector through CSS I ended up using the filterMenuInit event.
Grid column is configured using:-
.Filterable(f => f.Multi(true).Search(true));
I am adding another label to the rendered checkbox text using the below function:-
function addCustomLabel(e) {
var container = e.container;
var allCheckboxes = $("input[type='checkbox']", container);
$.each(allCheckboxes, function (id) {
$(this).attr("id", 'chk' + id).addClass("blueCheckbox");
var checkbox = $(this)[0];
console.log(checkbox);
var parentLabel = $(this).parent('label');
var labelText = parentLabel.text();
parentLabel.empty();
parentLabel.append(checkbox);
parentLabel.append("<label for='"+ 'chk' + id +"'>" + labelText + "</label>");
});
}
Hello everybody,
im trying to achieve that the dropdown filter list in my grid takes the size from it's biggest option.
I found other explanations for different situations and none of those worked for me.
I have a MVC Grid with a ForeignKey Column, that is filtered with a dropdown of enum values.
x.ForeignKey(b => b.Status, Model.OrderGapStatus).Filterable(f => f.Cell(c => c.Template("statusFilter"))).Title(Localizer.Lang_Status).ClientTemplate("#: StatusName #");
And a js handler trying to set the width to "auto". But it doesn't work :/
<script type="text/javascript">
function statusFilter(element) {
// what do i need to do here?
}
</script>
Help would be really appreciated 😃
Have a good day & happy coding
Nils