Dear all,
in our WPF application we used filter which you can see in the attachment. After that we decided bought and for our new Web Application, use Kendo for JQuery.
The problem is that the filter marked in red circle (see the attachment), doesn't work as in WPF!
On this example:
https://dojo.telerik.com/EcUdaFeT
you can see that filter with checkboxes works file, but when I try to use input fields, the filter doesn't work.
Could you be kind to show us how to do that?
Please, don't show us solutions you already have to your documentation since we saw all of them and are not suitable for our clients.
Thanks for the help!
@(
Html.Kendo()
.Grid<
Papr2WebMvc4.Models.PiprForms.PartnershipForm
>()
.Name("partnerShipFormGrid")
.Columns(columns =>
{
columns.Bound(form => form.Id).Hidden(true);//0
columns.Bound(form => form.Date).Format("{0:M/yyyy}").Title("Month");//1
columns.Bound(form => form.CommentsDescriptionsNotes).Hidden(true).Title("Partnership Description");//8
columns.Command(command => { command.Edit(); command.Destroy(); }).Hidden(false);
})//end columns
.Editable(edit => edit.Mode(GridEditMode.PopUp).TemplateName("AddEditPartnership").Window(window => window.Width(750)))
.ToolBar(toolbar => toolbar.Create())
.Selectable(select => select.Mode(GridSelectionMode.Single).Type(GridSelectionType.Row))
.DataSource(datasource => datasource
.Ajax()
.ServerOperation(true)
.Model(model => model.Id(form => form.Id))
.Read(read => read.Action("GetForm", "Form", new
{
planId = Model.PlanId,
planActivityId = Model.Activity.PlanActivityId,
activityType = Model.Activity.ActivityType,
activityTypeId = Model.Activity.ActivityTypeId
}))//end read
.Create(create => create.Action("AddForm", "Form", new
{
planActivityId = Model.Activity.PlanActivityId,
activityTypeId = Model.Activity.ActivityTypeId
}))//end create
.Destroy(destroy => destroy.Action("DeleteForm", "Form", new { planActivityId = Model.Activity.PlanActivityId }))
.Update(update => update.Action("EditForm", "Form", new
{
planActivityId = Model.Activity.PlanActivityId,
activityTypeId = Model.Activity.ActivityTypeId
})))//end datasource
//.Events(events => events.Change("onChange").DataBound("onDataBound"))
.Pageable(pages => pages.PageSizes(true))
)//end partnershipgrid
Here is my editor template
@model Papr2WebMvc4.Models.PiprForms.PartnershipForm
@{
if (!Model.Year.HasValue)
{
Model.Year = null;
}
if (!Model.Month.HasValue)
{
Model.Month = null;
}
Model.Groups= Model.GetGroups(Model.PlanActivityId, 0, Model.Id);
}
@Html.AntiForgeryToken()
@Html.ValidationSummary(true)
<
fieldset
>
<
legend
>@Model.FormActivityType</
legend
>
<
div
class
=
"editor-label"
>
Month partnerhsips were formed
</
div
>
<
div
class
=
"editor-field"
>
@Html.EditorFor(model => model.Month)/@Html.EditorFor(model => model.Year, new { @placeholder = "yyyy" })
</
div
>
@* @Html.Hidden("Date", new DateTime(Model.Year.Value, Model.Month.Value, 1))*@
<
div
>
@for(int i=0;i<
Model.Groups.Count
;i++)
{
<label>@Model.Groups.ElementAt(i).GroupName@Html.CheckBox("IsSelectedGroup"+@Model.Groups.ElementAt(i).GroupId)</
label
>
@*<
label
>@Model.Groups.ElementAt(i).GroupName@Html.CheckBoxFor(model => model.Groups.ElementAt(i).IsSelectedGroup, new { @id = "Group" + Model.Groups.ElementAt(i).GroupId })</
label
>*@
}
@* @{Html.RenderAction("GetGroups", "Form", new { planActivityId = Model.PlanActivityId,formId=Model.Id });}*@
</
div
>
<
div
class
=
"editor-label"
>
@Html.LabelFor(model => model.CommentsDescriptionsNotes, "Additional description of new partnerships")
</
div
>
<
div
class
=
"editor-field"
>
@Html.EditorFor(model => model.CommentsDescriptionsNotes)
</
div
>
</
fieldset
>
My problem is that I cannot get the checkbox to show selected when I select a form to edit. I also cannot seem to use checkboxfor in my edit templates because it says value is required and when I select one it selects them all. I can get my checkbox information to save properly using the regular checkbox method but this isn't working for getting those values back.I can use checkboxfor just fin outside of the grid editor templates.
This is using kendo grid in react
https://codesandbox.io/s/6lyv8y3q7r
Hi,
I modified https://demos.telerik.com/kendo-ui/grid/remote-data-binding for culture("de-DE"):
From https://docs.telerik.com/kendo-ui/framework/globalization/overview I appended:
<
script
src
=
"https://kendo.cdn.telerik.com/2018.2.516/js/cultures/kendo.culture.de-DE.min.js"
></
script
>
<
script
type
=
"text/javascript"
>
kendo.culture("de-DE");
</
script
>
see http://dojo.telerik.com/iToGuVUH
But it has no effect. The dateformat is US (month first) and the filter dialog is english.
Where is the error?
Peter
I'd like to perform an odata PATCH operation where only the dirty fields are sent in the request body.The code below is my latest attempt, but the grid continues to send the full set of fields. If I omit the data/type sections of the update option, then I get a PUT request with the full set of fields.
My other attempt involved omitting the update altogether and overriding the saveChanges event to make the request myself, but then I run into issues with dirty fields staying dirty. I know you can mess around with the css to remove the flags, but the datasource fields stay dirty and end up getting updated again the next time the saveChanges event is triggered.
Is there a way to let the grid know that the saveChanges event was successful so that it handles the dirty flags on its own? Another solution?
Thanks.
transport: {
read: {
url: serviceURL + entity.ClassName
},
update: {
url:
function
(data) {
var
key =
"("
+ data.ID +
","
+ data.NetworkID +
","
+ data.From +
","
+ data.To +
")"
;
return
serviceURL + entity.ClassName + key;
},
type:
"PATCH"
,
data:
function
(data) {
var
row = $(
"#elementGrid"
).data(
"kendoGrid"
).dataSource.get(data.ID);
var
updateData = {};
$.each(row.dirtyFields,
function
(key, value) {
updateData[key] = row[key];
});
return
updateData;
}
}
}
$scope.schedulerOptions = {
editable: false
}
but now we are unable to move or resize the event date range on the scheduler.
Is there a way to make it work without showing the default editor and making the events movable ?
How can we fix this issue?
I'm getting an error when trying to search for data on my grid.. The error I am receiving is this: "Uncaught TypeError: (d.ComponentId || "").toLowerCase is not a function". Thank you in advance for your help.
my grid definition looks like this:
$("#grid").kendoGrid({
toolbar: [
{ template: kendo.template($("#template").html())}
],
dataSource: {
data: filteredData
},
schema: {
model: {
fields: {
ComponentId: { type: "string", filterable:true },
Description: { type: "string", filterable:true }
}
}
},
selectable: true,
allowCopy: true,
height: 430,
sortable: true,
refresh: true,
filterable: {
mode: "row"
},
columns: [
{ field: "ComponentId",title: "Component Id", template: "#=test(data)#", filterable:true},
{ field: "Description",title: "Description", template: "#=description(data)#", filterable:true }
],
}).data("kendoGrid");
And my code to filter looks like this..
$("#btnSearch").on("click", function () {
alert("clicked");
var filter = { logic: "or", filters: [] };
$searchValue = $('#searchBox').val();
if ($searchValue) {
$.each($("#grid").data("kendoGrid").columns, function( key, column ) {
if(column.filterable) {
filter.filters.push({ field: column.field, operator:"contains", value:$searchValue});
}
});
}
$("#grid").data("kendoGrid").dataSource.query({ filter: filter });
});
Also, this is the code for my toolbar template:
<
script
id
=
"template"
type
=
"text/x-kendo-template"
>
<
label
class
=
"search-label"
for
=
"searchBox"
>Search Grid:</
label
>
<
input
type
=
"search"
id
=
"searchBox"
class
=
"k-textbox"
style
=
"width: 250px"
/>
<
input
type
=
"button"
id
=
"btnSearch"
class
=
"k-button"
value
=
"Search"
/>
<
input
type
=
"button"
id
=
"btnReset"
class
=
"k-button"
value
=
"Reset"
/>
</
script
>
https://dojo.telerik.com/@alexy99/EKomOrIh
I'm trying to follow below document to link markers with Paths, but every layer is ignoring my paths. No error messages.
https://docs.telerik.com/kendo-ui/controls/diagrams-and-maps/map/how-to/link-marker-to-location
Thanks,
Alex