Telerik Forums
Kendo UI for jQuery Forum
2 answers
1.5K+ views
I need to have a column (the last one) in the grid not have any text displayed. I tried putting the title to an empty string but it did not work. Solutions? Code is below:

function init() {     
$('#dealerDetailsGrid').kendoGrid({         
dataSource: {             
type: "json",             
transport: {                 
read: "GetDealerDetails"             
},             
schema: {                 
data: "data",                 
total: "total"             
},             
pageSize: 10         
},         
sortable: true,         
pageable: true,         
columns: [            
  { field: "Oracle", title: "Oracle #" }, 
{ field: "Dealer" }, { field: "DealerType", title: "Dealer Type" }, 
{ field: "City" }, { field: "State" }, { field: "Status" }, 
{ field: "Remove", title: "" }         
]     
});
}
Preslav
Telerik team
 answered on 15 May 2017
1 answer
195 views
I am using Telerik UI Scheduler for asp.net core Project.I am using WebApi to bind data and insert new meeting to the room but I have 2 problems are:

 1. insert is called twice when I insert new Item. 
 2. update and delete methods are bound to Post and they are not calling corresponded  do delete of add operation.
 
 
html view
 
    @(Html.Kendo().Scheduler<Meeting>().Name("scheduler").Date(new DateTime(2017, 5, 13))
          .StartTime(new DateTime(2017, 5,13, 7, 00, 00))
          .Editable(true)
          .Views(views=>{
              views.DayView();
              views.AgendaView();
          })
          .Height(600)
          .Timezone("Etc/UTC")
          .Group(group => { group.Resources("Rooms"); group.Date(true); })
          .Resources(resource =>
          {
              resource.Add(m => m.RoomId).Title("Room").Name("Rooms").DataTextField("Text").DataValueField("Value").DataColorField("Color").BindTo(new[] {
                  new { Text = "Meeting Room 101", Value = 1, Color = "#6eb3fa" },
                  new { Text = "Meeting Room 201", Value = 2, Color = "#f58a8a" }
              });
              resource.Add(m => m.Attendees)
                  .Title("Attendees")
                  .Multiple(true)
                  .DataTextField("Text")
                  .DataValueField("Value")
                  .DataColorField("Color")
                  .BindTo(new[] {
                      new { Text = "Alex", Value = 1, Color = "#f8a398" } ,
                      new { Text = "Bob", Value = 2, Color = "#51a0ed" } ,
                      new { Text = "Charlie", Value = 3, Color = "#56ca85" }
                  });
          }).DataSource(d => d
              .WebApi()
              .Model(m =>
              {
                  m.Id(f => f.RecordId);
                  m.Field(f => f.Title).DefaultValue("No title");
                  m.Field(f => f.Title).DefaultValue("No title");
              })
              .Events(events => events.Error("error_handler"))
              .Read(read => read.Action("Get", "Meeting"))
              .Create(create => create.Action("Post", "Meeting"))
             .Update(update => update.Action("Put", "Meeting", new { id = "{0}" }))
             .Destroy(destroy => destroy.Action("Delete", "Meeting", new { id = "{0}" }))
              ).Deferred())
     
        @* All initialization scripts are rendered to the bottom of the page, see _Layout.cshtml *@
        @section scripts {
            @Html.Kendo().DeferredScripts()
        }
        <script>
    function error_handler(e) {
        var errors = $.parseJSON(e.xhr.responseText);
     
        if (errors) {
            alert("Errors:\n" + errors.join("\n"));
        }
    }
        </script>
 
meeting Web api controller
  
 
     [Route("api/[controller]")]
        public class MeetingController : Controller
        {
            private IMeetingData meetingData;
     
            public MeetingController(IMeetingData meetingData)
            {
                this.meetingData = meetingData;
            }
     
            // GET api/task
            [HttpGet]
            public DataSourceResult Get([DataSourceRequest]DataSourceRequest request)
            {
                return meetingData.GetAll().ToDataSourceResult(request);
            }
     
            // POST api/Meeting
            [HttpPost]
            public IActionResult Post(Meeting m)
            {
                if (!ModelState.IsValid)
                {
                    return BadRequest(ModelState.Values.SelectMany(v => v.Errors).Select(error => error.ErrorMessage));
                }
     
                meetingData.Insert(m, null);
     
                return new ObjectResult(new DataSourceResult { Data = new[] { m }, Total = 1 });
            }
     
            // PUT api/Meeting/5
            [HttpPut("{id}")]
            public IActionResult Put(int id, Meeting m)
            {
                if (ModelState.IsValid && id ==  m.RecordId)
                {
                    try
                    {
                        meetingData.Update(m, null);
                    }
                    catch (Exception)
                    {
                        return new NotFoundResult();
                    }
     
                    return new StatusCodeResult(200);
                }
                else
                {
                    return BadRequest(ModelState.Values.SelectMany(v => v.Errors).Select(error => error.ErrorMessage));
                }
            }
     
            // DELETE api/Meeting/5
            [HttpDelete("{id}")]
            public IActionResult Delete(int id)
            {
                try
                {
                    meetingData.Delete(new Meeting { RecordId = id }, null);
                }
                catch (Exception)
                {
                    return new NotFoundResult();
                }
     
                return new StatusCodeResult(200);
            }
        }
    }
Ianko
Telerik team
 answered on 15 May 2017
3 answers
191 views

Hi there.

I'm having an issue with the "pdf" feature when it's being executed in an environment diffent than localhost.

Consider I have Kendo UI in my ASP.Net MVC 5 application located under "/Content/js/kendoui" path. In order to make the pdf generation works, I had to add "fonts/DejaVu" under "/Content/js/kendoui/styles/" path. In my development environment, it works, because the scheduler's pdf feature looks after it under "/Content/js/kendoui/styles/fonts/DejaVu/DejaVuSans.ttf?v=1.1" url.

But when I deploy the app in another environment, that feature looks after those fonts in a totally different path! It tries to reach it under "/css/fonts/DejaVu/DejaVuSans.ttf?v=1.1" url.

Why that happens and how can I fix it?

Thanks in adv.

Plamen
Telerik team
 answered on 15 May 2017
3 answers
321 views

I got error message when I called Stored Procedures "GetCustOutstanding" from Web API and want to send data to kendo grid.  How can I fix that?  Thanks.

Error message: "The result of a query cannot be enumerated more than once."

IQueryable<GetCustOutstanding_Result> result = db.GetCustOutstanding().OrderBy(x=>x.NetDay).AsQueryable();

return result.ToDataSourceResult(request.Take, request.Skip, request.Sort, request.Filter);  <=== error in this line

Boyan Dimitrov
Telerik team
 answered on 15 May 2017
3 answers
157 views

According to the API 'execute' event "Fires when an Editor command is executed."

 

But id doesn't fire on table or image insert.

Example: http://dojo.telerik.com/uGUvE

 

Nikolay
Telerik team
 answered on 15 May 2017
7 answers
212 views

Hello,

 

In our app we use google maps and we have embedded forms with some kendo combobox, numeric textbox, buttons...

When I open the map fullscreen mode, the combobox list is not displayed.

This only happens with Firefox and Internet Explorer. Chrome is OK

 

Here is a dojo.telerik which shows the problem : http://runner.telerik.io/fullscreen/@tdf/eZOgA/5

Thanks in advance

Thierry
Top achievements
Rank 1
 answered on 15 May 2017
9 answers
1.0K+ views
Hello,
I am looking at replacing our current editor with this Kendo Editor.  I have set up a small demo project in VS 2010 and I have noticed that when I send the editor complete html (i.e. with <html />, <body />, etc...) it all gets removed and anything in areas like <head> stays around.
Is there a way to tell the editor not to strip these tags?
what other sort of formatting does the editor do on the HTML that i send it?

Thanks,
-Scott
Dimo
Telerik team
 answered on 15 May 2017
1 answer
368 views

Hi

I'm getting a 404 error on the following CDN link. Could you advise where the most recent version of this file is please?

 

https://kendo.cdn.telerik.com/2017.2.504/styles/kendo.dataviz.black.mobile.min.css 

Stefan
Telerik team
 answered on 15 May 2017
2 answers
6.7K+ views
Hi,

I was looking at the forum, but I didn't find any message related to this. I would like to allow users to change the number of rows displayed in the grid for example 15, 30, 50. So far, I see that the pageSize property is specified when initializing the grid. Also, I havent' see any example where the number of rows can be changed dinamically, for example a drop down list with the number of rows next to the pagination numbers, or a text box when the number of pages can be entered.

Thanks for your help

Dimo
Telerik team
 answered on 15 May 2017
3 answers
293 views
Hello.
We have functionality, which allows to set non-date(string "No due date") value on initialization, and after picking date(see ex. below)
Some time ago(I think it was happened after updating to one of the latest release) this functionality was broken.
Now after setting non-date value datepicker sets current date itself.

How we can repair our functionality? Is any workaround to set non-date value?


Example of our workaround, which now doesn't have effect:

  function setDueDateToNoDueDate() {
                $scope.dueDateWidget.value($scope._noDueDateText);
                $scope.dueDateWidget.element[0].value = $scope._noDueDateText;
                $scope.dueDateWidget.trigger("change");
            }





Stefan
Telerik team
 answered on 15 May 2017
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?