Telerik Forums
Kendo UI for jQuery Forum
1 answer
130 views

Hi Kendo Gurus,

I am have a really tough time with a binding issue and I am not sure if it is MVVM related or Template related. I will try and provide as much information as possible.

The binding is done via nested templates like this:


obsOccupants is an ObservableArray that is a child property to an ObservableObject, that is bound to a form and includes the below. The "s20-employees-list" template looks like this:



I do NOT believe that anything above is an issue as this binds and works just fine on initial load, ala (I'm hiding information so there are blanks):



Further, clicking the delete icon on the right (red trash can) "soft" deletes the row via the click event handler in the bindings (pictured above), resulting in this:



Clicking the undelete icon on the right (green trash can) also behaves as expected. This is done by updating the isDeleted property on an ObservableObject in the ObservableArray. Additionally, there are other, more complicated bindings that are working just fine in the same form, although no adds - this is the first.

So far so good and I thought I was on fire. But now, when I click the Add Occupant button, search for an employee (via a separate UI not pictured) and select an employee and add it to the Observable array, things go south.

The code to add to the Observable array looks like this, and I have tried all three permutations below (First Try, Second Try, etc.). The third one seems really stupid and I was hoping that would not be the answer. :D  



All of these fire a bound change event as expected, and you can see that the count of obsOccupants has increased to 2 and the added employee is included in the event, ala: 



So the new employee exists in the obsOccupants array, the count is correct but the HTML does not update, although as mentioned above, a change on any of the objects IN the Observable Array correctly updates the HTML..

I have tried simplifying the HTML as well as the bindings but still to no avail. Is there anything I should be looking for or trying?

Thankyou for any help.

Cheers,

Justin




Justin
Top achievements
Rank 1
Iron
 answered on 27 May 2024
5 answers
324 views

I have started using Kendo GanttChart Asp.net MVC. I want to display two record on the same line. Is this feature available in Kendo GanttChart Asp.net MVC?

My requirement is attached.

 

Leandro
Top achievements
Rank 1
Iron
 answered on 27 May 2024
1 answer
58 views
Is it possible to have a dropdownlist inside the kendoFilter instead of normal textbox, numeric textbox or datepicker?
Yordan
Telerik team
 answered on 27 May 2024
1 answer
134 views

Duplicate subfolder entries show up in the left-hand TreeView, when following these steps:

Steps to reproduce:

  1. Go to https://dojo.telerik.com/?_gl=1*2z9m1t*_ga*NDczOTA3MjcwLjE3MTYyNDA5MTc.*_ga_9JSNBCSF54*MTcxNjQ2NTgzMy40LjEuMTcxNjQ5Njc0Ny4zNC4wLjA.*_gcl_au*MTc1OTAwMzE4Mi4xNzE2MjQwOTE3 (or https://demos.telerik.com/kendo-ui/filemanager/index )
  2. Click the "Documents" folder on the left (treeview)
  3. Click "New Folder" to create a new folder.  Name does not matter. 
  4. In the left-hand treeview, select any other folder besids "Documents"
  5. Select "Documents" again in the treeview. 
  6. Notice that "New Folder" now shows up two times under "Documents"
  7. You can repeat steps 4-6, and another duplicate "New Folder" will show up each time. 
  8. Also, clicking "Grid View" or "List View" while "Documents" is selected, will add another duplicate

This is in version 2024.2.514, which is the latest as of now.  

Martin
Telerik team
 answered on 27 May 2024
2 answers
72 views

After testing the new paragraph and formatting marks toolbar selection, I am seeing a couple of issues when using this selection for inline editing.  The first issue is that formatting marks are generated in all editors and across all elements on the html page, not just the selected editor.  The second issue is that if the editor area is scrollable, the formatting marks do not scroll with the content and remain stationary.

Please see this Dojo for example of the issues:

https://dojo.telerik.com/AZosilAv

Thanks.

Martin
Telerik team
 answered on 27 May 2024
1 answer
75 views
Does it stop upgrading?
Nikolay
Telerik team
 updated answer on 27 May 2024
1 answer
116 views

Is it possible to use HTML fragments in the legends.template (https://docs.telerik.com/kendo-ui/api/javascript/dataviz/ui/chart/configuration/legend.labels#legendlabelstemplate)?

I tried several html tags (<span></span>, <br/>), but the template is rendered as clear text, not as html text. even the \n does not work :

config:



legend: {
    position: "bottom",
    labels: {
      template:
      function(e){
        return '<span style="color: red;">' + e.text +'</span>';
      }  
    }
  }

result:

Nikolay
Telerik team
 answered on 24 May 2024
0 answers
59 views
Hello,
Thank you for helping us on successfully version upgrade which I mentioned here. The Current version is 2023.3.1114. Now I'm facing another issue. On selecting the filter option (three dots on column), I'm getting error in my console panel. This configuration works in some pages and breaks in some pages. I've attached console error
Below is my sample code.

var gridName = <HTML_SELECTOR+NAME>,
    gridURL = <SERVER_URL>,

    columnNames = [{
        template: "# if((uploaded_status =='Delete In Process')||(uploaded_status =='GSTN Delete Error')||(uploaded_status =='Saved')|(uploaded_status =='Submitted')|(uploaded_status =='Filed') ){} else { # <input type='checkbox' class='checkBoxClassInv' name='selectgst[]' value='#: data.gstin_of_customer #:#: data.invoice_no #'>  #}#",
        field: "gstin",
        title: "<input type='checkbox' check-id='checkBoxClassInv' class='checkAllGrid'>",
        filterable: false,
        sortable: false,
        groupable: false,
        width: 30
    }, {
        template: "<div class='status #: uploaded_status #'>#: uploaded_status #</div>",
        field: "uploaded_status",
        title: "Status",
        width: 100
    }, {
        field: "outwardvsgstr1_status",
        title: "OutwardVsGstr1 Status",
        width: 90
    }, {
        field: "invoice_category",
        title: "Tran Type",
        width: 100
    }, {
        field: "doc_type",
        title: "Doc Type",
        width: 100
    }, {
        template: "<span class='grid-align-left'>#: customer_name #</span>",
        field: "customer_name",
        title: "Customer Name",
        width: 200
    }, {
        template: "<span class='invoice_no' >#: invoice_no #</span>",
        field: "invoice_no",
        title: "Doc No ",
        width: 100
    }, {
        field: "invoice_date",
        title: "Doc Date",
        width: 100
    }, {
        field: "place_of_supply",
        title: "POS",
        width: 90
    }, {
        command: [{
            text: " ",
            name: "Details",
            click: outwardInvoiceDetails,
            iconClass: "k-icon k-icon-20 k-i-info m-r-0-imp op-1"
        }, {
            text: " ",
            name: "Edit",
            click: outwardInvoiceEditDetails,
            iconClass: "k-icon k-icon-20 k-i-edit m-r-0-imp op-1",
            visible: function (dataItem) {
                if ((dataItem.uploaded_status == 'Deleted') || (dataItem.uploaded_status == 'Pending Response') || (dataItem.uploaded_status == 'Delete In Process') || (dataItem.uploaded_status == 'GSTN Delete Error') || (dataItem.uploaded_status == 'Saved') || (dataItem.uploaded_status == 'Submitted') || (dataItem.uploaded_status == 'Filed')) { } else {
                    if (outwardManualEntryConf == 1 && editable == 1) {
                        return true;
                    } else {
                        return false;
                    }
                }
            }
        }],
        title: "<span class='select'>Details</span>",
        width: 130
    }],

    gridData = {
        p_gstin: gstin,
        return_period: fpdate
    };
//below is kendo grid defination
$("#" + gridId).empty().kendoGrid({

    dataSource: {
        transport: {
            read: {
                url: <SERVER_URL>,
                type: "POST",
                headers: {
                    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
                },
                data: gridData,
                dataType: "json"
            }
        },
        schema: {
            aggregates: serverAggregateConf,
            model: modelConf,
            parse: function (response) {
                //schema response structure
            },
            total: function (count) {
                // custom total page counter
            }
        },
        error: function (response) {
            dataSourceError(response);
        },
        serverPaging: serverpgination,
        pageSize: defaultPageSize,
        aggregate: aggregateConf,
        serverAggregates: typeof (serverAggregateConf) == 'undefined' ? false : true
    },
    dataBound: function (e) {
        //UI manipulations logic
    },
    scrollable: true,
    change: function (e) {
        //setting heights as per UI
    },
    dataBinding: function () {
        srno = (this.dataSource.page() - 1) * this.dataSource.pageSize();
    },
    noRecords: {
        //custom message if no message
    },
    height: 800,
    groupable: groupableConf,
    sortable: sortableConf,
    columnMenu: columnMenuConf,
    resizable: resizableConf,
    pageable: pagingConf,
    filterable: filterConf,
    columns: gridColumns,
    excelExport: excelConf,
    excel: {
        allPages: true
    }
}).data("kendoGrid");

Abhijeet
Top achievements
Rank 1
 asked on 23 May 2024
1 answer
80 views

We have been using an older version of your libraries from 2021 and decided to update it to the current one.

We have a grid and we have been using server-side filtering/sorting/etc... In the old version there used to be syntax like this: 

filter: RequestStatus~eq~1~and~PersonFullName~contains~'Steve'

 

We took this string, parsed, and processed the data. However, with the update, this is no longer the case. Now it looks like this:

And we are clueless on how to properly parse and or process this format on our back end.

 

This is the code that we use on the front end to query the back end.

    gridDataSource = new kendo.data.DataSource({
        serverFiltering: true,
        serverGrouping: true,
        serverSorting: true,
        serverPaging: true,
        serverAggregates:true,
        pageSize: 25,
            transport: {
                read: {
                    url: __config.baseUrlAbsolute + "Requests/Home/GetCurrentViewRequests",
                    dataType: "json",
                    data: function () {
                        return {
                            type: requestTypesList[requestType],
                            id: personId,
                        };
                    }
                }
            },
    });
    })

 

Our backend is .NET MVC and this is the method that we have used to process the request. But this no longer works.

 public string GetCurrentViewRequests([DataSourceRequest] DataSourceRequest request, int type, int id)
 {
       var filters = Request.Params.Get("filter");
       var groups = Request.Params.Get("group");
       var sorts = Request.Params.Get("sort");

       //Process
}

 

Would you be so kind as to point us in the right direction on how to properly parse and process the request?

Neli
Telerik team
 answered on 22 May 2024
2 answers
347 views
The latest version of Firefox released yesterday appears to have broken navigating between views in the Hybrid UI. Upon changing views the page goes blank. I am seeing this also happen in the demos: https://demos.telerik.com/kendo-ui/m/index
Nikolay
Telerik team
 answered on 21 May 2024
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?