Telerik Forums
Kendo UI for jQuery Forum
3 answers
367 views

Hi,

Im using a grid to display near real-time data from c#/ASP.Net server side via SignalR - adding/updating data rows with pushUpdate().

I already have one grid working in this manner but I haven't been able to work out why updates to a new grid are failing with the error:

TypeError: target.accept is not a function
    at init.pushUpdate (kendo.all.js:6765)

In the following line (kendo.all.js:6762) - I noticed that model.id was undefined:

var target = this.get(model.id);

I have replicated this on dojo. It appears the grid/datasource doesn't handle the initial data, then does reflect the first update, but not the second.

 

On my machine, I'm using the following:

Kendo UI for jQuery R3 2019

Windows 10

Firefox 69.0.3
Chrome 77.0.3865.120

jQuery 3.3.1

Steve
Top achievements
Rank 2
Iron
 answered on 29 Oct 2019
1 answer
8.5K+ views

I have a grid with 5 columns - COL1 to COL5. I call a function when the user selects a row and chooses a menu option from a context menu. The function gets the selected row. All I want to do is set the text of a certain column in the selected row:

 

    var grd = $(gridCTL).data('kendoGrid');
    var selectedItem = grd.dataItem(grd.select());

    selectedItem.COL1 = "new value"; // this does not work

 

Can anyone help with this simple task ?!

Petar
Telerik team
 answered on 29 Oct 2019
1 answer
127 views

  I have a kendoComboBox, with an associated dataSource that has more items than the PageSize. This comboBox is bound to one my columns in the grid. When creating a new record, i can access the items for this comboBox, that are not in the first 'pageSize items', by using the comboBox's filter and suggestion features, so i start typing, and can access a previously unloaded item. My problem occurs after i have created a record, and selected an item in this comboBox, that was not loaded at first on the dataSource, that is, an item greater than the PageSize. When i open the popup, and try to edit such a record, the comboBox is unable to find the previously selected item and, only displays the item's value field, instead of it's text field. From what I understand, because the item is not loaded in the dataSource by default, since it is greater than the PageSize, the comboBox's dataSource is unable to find the dataItem an assign it to the comboBox. So, what i would like to know, is if there is a way to load items that are larger than the dataSource's pageSize, when editing a record that already has these items selected on their comboBoxes.

  

Ivan Danchev
Telerik team
 answered on 28 Oct 2019
5 answers
1.5K+ views

Hi

 

To speed up a grid with a lot of dropdownlists, I want to only write the text to the cells initially and, on click, load the dropdownlist of this cell, replace the text with it, so the user can use the dropdownlist from now on.

I'm replacing the text-cell-template with the dropdownlist-cell-template, but the dropdownlist does not get bound automatically.

What's the best way, to initialize the new dropdownlist-cell-template only, without rerendering/rebinding everything else?

 

Example: http://dojo.telerik.com/uZOBALUp/2

 

Greets Robin

Tsvetomir
Telerik team
 answered on 28 Oct 2019
7 answers
5.0K+ views
Quick question... In my Telerik Control Panel I have the option to install Kendo UI Professional and UI for ASP.NET MVC. This is probably a stupid question, but what is the difference?

Thanks!
Taffy Lewis
Top achievements
Rank 1
 answered on 25 Oct 2019
5 answers
631 views
Hi,

How do I prevent a date time picker's input box to NOT automatically select all the text on click? Essentially turning it into a default textbox?
Viktor Tachev
Telerik team
 answered on 25 Oct 2019
1 answer
127 views

Recent 2019.3.1023 causes clicking on grid column's filter operator to select all text on whole dialog.

https://dojo.telerik.com/ErejUFaY/2

Ivan Danchev
Telerik team
 answered on 25 Oct 2019
1 answer
61 views

I had to use a "custom" component in the kendoFilterMenu, so I tried the "ui" that is documented in the grid api, and it works.

I think you should add it to the kendoFilterMenu configuration section.

Example: https://dojo.telerik.com/@foxontherock/UBiVIQef

missing documentation here: https://docs.telerik.com/kendo-ui/api/javascript/ui/filtermenu#configuration

Nikolay
Telerik team
 answered on 23 Oct 2019
3 answers
141 views
Dear,

I am doing a booking system with Kendo UI Scheduler, once I delete one event, it always call the POST action instead of the DELETE action declared in my Odata API.
My Odata Controller is like that:
// POST: odata/BookingSchedulers
        [ValidateHttpAntiForgeryToken]
        public async Task<IHttpActionResult> Post(BookingScheduler bookingScheduler)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            bookingScheduler.Start = bookingScheduler.Start.ToLocalTime();
            bookingScheduler.End = bookingScheduler.End.ToLocalTime();

            _bookingSchedulerRepository.Create(bookingScheduler);
            await _bookingSchedulerRepository.SaveAsync();

            return Created(bookingScheduler);
        }

// DELETE: odata/BookingSchedulers(5)
        [ValidateHttpAntiForgeryToken]
        public async Task<IHttpActionResult> Delete([FromODataUri] int key)
        {
            BookingScheduler bookingScheduler = await _bookingSchedulerRepository.FindAsync(key);
            if (bookingScheduler == null)
            {
                return NotFound();
            }

            _bookingSchedulerRepository.Delete(bookingScheduler);
            await _bookingSchedulerRepository.SaveAsync();

            return StatusCode(HttpStatusCode.NoContent);
        }

My POCO is 
public class BookingScheduler
    {
        public int BookingSchedulerID { get; set; }
        public int BookingItemID { get; set; }
        public int ItemBreakdownID { get; set; }
        public string BookingUser { get; set; }
        public DateTime Start { get; set; }
        public DateTime End { get; set; }
        public int StaffID { get; set; }
        public int RoomID { get; set; }
        public string Description { get; set; }
        public string StartTimezone { get; set; }
        public string EndTimezone { get; set; }
        public string RecurrenceID { get; set; }
        public string RecurrenceRule { get; set; }
        public string RecurrenceException { get; set; }
        public bool IsAllDay { get; set; }

        public virtual BookingItem BookingItem { get; set; }
        public virtual Room Room { get; set; }
        public virtual Staff Staff { get; set; }
        public virtual ItemBreakdown ItemBreakdown { get; set; }
    }

and My scheduler datasource is:
bookingDataSource: new kendo.data.SchedulerDataSource({
                //batch: true,
                type: "odata",
                transport: {
                    read: {
                        url: config.bookingSchedulersUrl + '?$expand=ItemBreakdown',
                        dataType: "json"
                    },
                    update: {
                        url: function (data) {
                            return config.bookingSchedulersUrl + "(" + data.BookingSchedulerID + ")";
                        },
                        dataType: "json",
                        type: "PUT",
                        beforeSend: function (req) {
                            req.setRequestHeader('RequestVerificationToken', token);
                        }
                    },
                    create: {
                        url: config.bookingSchedulersUrl,
                        dataType: "json",
                        type: "POST",
                        beforeSend: function (req) {
                            req.setRequestHeader('RequestVerificationToken', token);
                        }
                    },
                    destroy: {
                        url: function (data) {
                            alert(data.BookingSchedulerID);
                            return config.bookingSchedulersUrl + "(" + data.BookingSchedulerID + ")";
                        },
                        dataType: "json",
                        type: "DELETE",
                        beforeSend: function (req) {
                            req.setRequestHeader('RequestVerificationToken', token);
                        }
                    }
                },
                error: function (e) {
                    alert(e.xhr.responseText);
                },
                requestEnd: function(e){
                    //if (e.type == "update") {
                    //    openMessageWindow("#popup-message-template", messageViewModel("Edited Successfully.", "MESSAGE", false));

                    //    var scheduler = $("#scheduler").data("kendoScheduler");
                    //    scheduler.view(scheduler.view().name);
                    //}

                    //if (e.type == "create") {
                    //    openMessageWindow("#popup-message-template", messageViewModel("Created Successfully.", "MESSAGE", false));

                    //    var scheduler = $("#scheduler").data("kendoScheduler");
                    //    scheduler.view(scheduler.view().name);
                    //}

                    if (e.type == "destory") {
                        openMessageWindow("#popup-message-template", messageViewModel("Deleted Successfully.", "MESSAGE", false));

                        var scheduler = $("#scheduler").data("kendoScheduler");
                        scheduler.view(scheduler.view().name);
                    }
                },
                schema: {
                    data: function (data) {
                        return data.value;
                    },
                    total: function (data) {
                        return parseInt(data["odata.count"]);
                    },
                    model: {
                        id: "bookingSchedulerID",
                        fields: {
                            bookingSchedulerID: { from: "BookingSchedulerID", type: "number" },
                            bookingItemID: { from: "BookingItemID", type: "number", defaultValue: data.BookingItemID },
                            itemBreakdownID: { from: "ItemBreakdownID", type: "number", nullable: true },
                            title: { from: "BookingUser", defaultValue: userName },
                            start: { type: "date", from: "Start" },
                            end: { type: "date", from: "End" },
                            roomId: { from: "RoomID", type: "number", nullable: true },
                            staffId: { from: "StaffID", type: "number", nullable: true },
                            startTimezone: { from: "StartTimezone" },
                            endTimezone: { from: "EndTimezone" },
                            description: { from: "Description" },
                            recurrenceId: { from: "RecurrenceID" },
                            recurrenceRule: { from: "RecurrenceRule" },
                            recurrenceException: { from: "RecurrenceException" },
                            isAllDay: { type: "boolean", from: "IsAllDay" },
                            image: { from: "ItemBreakdown.ItemBreakdownImageURL" },
                            itemBreakdownName: { from: "ItemBreakdown.ItemBreakdownName" },
                            color: { from: "ItemBreakdown.Color" }
                        }
                    }
                },
                serverFiltering: true,
                filter: {
                    field: "BookingItemID",
                    operator: "eq",
                    value: data.BookingItemID
                }
            }),

Any one can help, Thanks.


Dimitar
Telerik team
 answered on 23 Oct 2019
2 answers
673 views

Hi support.

I'm using the bootstrap v3 theme in a grid where inline editing is enabled.

I would like to customize the field validation error message and can do this by overriding a few kendo css classes like in the attached screenshot.

I'm wondering if this is the preferred way to customize the grid inline edit field error tooltip?

Best regards

Morten

Morten
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 22 Oct 2019
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?