Telerik Forums
Kendo UI for jQuery Forum
1 answer
52 views

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!

 

Stefan
Telerik team
 answered on 18 Jun 2018
3 answers
232 views
Can you please share a simple working sample in which we have:

- vertical splitter with three panes (A,B,C)
- in pane A there area images(logos)
- in pane B there is a menu
- when you select an option(item) of the menu, you can load a page (url) into the pane C
- pane C could be a pane or iframe

I had been searching in the forum, but there is not a sample like the one I mentioned, using ajaxrequest or contentUrl it doesnt work
Fernando
Top achievements
Rank 1
 answered on 15 Jun 2018
7 answers
684 views
I have a grid
@(
                   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.

Martin
Telerik team
 answered on 15 Jun 2018
1 answer
326 views
We have charts that are databound and can have variable numbers of categories. A second axis can be added, but we would like it to also display on the far right of the chart. This means that setting the axisCrossingValue = [0, 10] (or something to that effect) might not work in every case. Is there a way to set the second axis to always be at the right without just setting the crossing value to some very large number?
Tsvetina
Telerik team
 answered on 15 Jun 2018
1 answer
84 views

This is using kendo grid in react

 

https://codesandbox.io/s/6lyv8y3q7r

Stefan
Telerik team
 answered on 15 Jun 2018
5 answers
856 views

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 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

 

 

 

 

 

Peter
Top achievements
Rank 1
 answered on 15 Jun 2018
2 answers
643 views
Hi, 

 

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;
    }
   }
}
Angel Petrov
Telerik team
 answered on 15 Jun 2018
1 answer
83 views
In our scheduler we have developed custom event editor which is opened in a new page and not using the default editor. However, if we disable the default editor using 
    
$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?

editable property set to false example

Ivan Danchev
Telerik team
 answered on 15 Jun 2018
1 answer
848 views

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>

 

 

 

Stefan
Telerik team
 answered on 15 Jun 2018
3 answers
97 views

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

Alex
Top achievements
Rank 1
 answered on 14 Jun 2018
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?