Telerik Forums
Kendo UI for jQuery Forum
1 answer
262 views

Hi

Do you have an PDF Export sample that running on complete window modalf for Kendo UI v2016.1.226

 

Regards

 

Dimitar
Telerik team
 answered on 14 Jul 2021
1 answer
79 views
Hello i am trying to get the kendoeditor inside of a treelist with incell editing.. this is working here https://dojo.telerik.com/UnEguTAJ , but I'd like the rows on both sides (locked left and right ) to expand to the same height when clicking into to edit one of the fields...
Nikolay
Telerik team
 answered on 14 Jul 2021
0 answers
524 views

 

  • The grid fires all "read", "create", "update" and "destroy" action methods from the controller when I use: "kendo.data.GanttDataSource" but when I use "kendo.data.DataSource", the grid only fires "read".
  • When I hit "Add new record" button and fill all the details, one corresponding create action method is fired (which is successful) but also fires multiple failed update action method (the number of these fires is equal to number of rows in the grid)
  • When I hit delete, Delete event is triggered for all the records thus making my grid empty.

 

<script>
    $(document).ready(function () {
        var datasource = new kendo.data.GanttDataSource({
            type: "json",
            transport: {
                read: {
                    url: '@Url.Action("Details", "Student")',
                    //url: "/Student/Details",
                    dataType: "json",
                    type: "GET"
                },
                create: {
                    url: '@Url.Action("AddStudent", "Student")',
                    //url: "/Student/AddStudent",
                    dataType: "json",
                    type: "POST"
                },
                update: {
                    url: '@Url.Action("UpdateStudent", "Student")',
                    //url: "/Student/UpdateStudent",
                    dataType: "json",
                    type: "POST"
                },
                destroy: {
                    //url: '@Url.Action("DeleteStudent", "Student")',
                    url: "/Student/DeleteStudent",
                    dataType: "json",
                    type: "POST"
                },
                parametermap: function (options, operation) {
                    if (operation !== "read" && options.models) {
                        return { models: kendo.stringify(options.models) };
                    }
                },
                pageSize: 2,
                schema: {
                    model: {
                        id: "rollno",
                        fields: {
                            rollno: { from: "rollno", type: "number" },
                            name: { from: "name", type: "string" },
                            address: { from: "address", type: "string" }
                        }
                    }
                }
            }
        });

$("#stdGrid").kendoGrid({
            dataSource: datasource,
            columns: [
                {
                    field: "rollno",
                    title: "Roll No."
                },
                {
                    field: "name",
                    title: "Name"
                },
                {
                    field: "address",
                    title: "Address"
                },
                { command: [ "edit", "destroy"], titlt:"&nbsp"}
            ],
            toolbar: ["search", "create"],
            //autobind: true,
            autosync: false,
            filterable: true,
            sortable: true,
            editable: "inline",
            pageable: true,
            save: function (e) {
                setTimeout(function () {
                    //$("#stdGrid").data("kendoGrid").refresh();
                    $("#stdGrid").data("kendoGrid").dataSource.read();
                }, 200);
            }
        });
    });
</script>

<style type="text/css">
    .k-grid-search {
        margin-left: auto;
        margin-right: 0;
    }
</style>
Shamanth
Top achievements
Rank 1
 updated question on 14 Jul 2021
1 answer
141 views

Hi,

I recently upgraded our apps to latest kendo UI version and one of things we had implemented is broken: 

Collapse/expand gantt list to a certain level (for example I want only first or first two levels to be expanded).

Before we used data-level property that was part of gantt list, but it seems that with R3 2020 since gantt custom list was replaced with a treelist this is gone.

Was this property removed by accident or it is intentional? If it was intentional, could you advice on new approach.

I would like avoid iterating through all elements and finding structure, since we have cases where projects have a lot of elements and also some other conditions included.

Thanks

Ianko
Telerik team
 answered on 14 Jul 2021
0 answers
435 views

Hi,

while reading other threads, i got to know that Kendo doesnt support sticky column on the right hand side, but is there a way to achieve this?

I am using something similar to command bar as the last visible column in the grid, but i need it to be sticky when i horizontally scroll the grid. 

can you please suggest a way to achieve this?

Thanks,

ashutosh
Top achievements
Rank 1
Iron
Veteran
 asked on 14 Jul 2021
1 answer
934 views

Hi,  I am using cascading dropdown list and trying to pass a parameter to the function that I am calling to get the data from DB. Below is my code, whenever this function is called it passes NULL. Anyone has any idea why?

var categories = $("#categories").kendoDropDownList({ optionLabel: "Select category...", dataTextField: "CategoryName", dataValueField: "CategoryID", dataSource: { type: "odata", serverFiltering: true, transport: { read: {
                                url: '@Url.Action("Getcategories")',

                                contentType: "application/json",
                                type: "GET"
                            } } } }).data("kendoDropDownList"); var products = $("#products").kendoDropDownList({ autoBind: false, cascadeFrom: "categories", optionLabel: "Select product...", dataTextField: "ProductName", dataValueField: "ProductID", dataSource: { type: "odata", serverFiltering: true, transport: { read: {

                                url: '@Url.Action("GetProduct")?Catid=' + $("#categories").val(),

                                contentType: "application/json",
                                type: "GET"

                            }
                        }
                    }).data("kendoDropDownList");
Neli
Telerik team
 answered on 14 Jul 2021
1 answer
489 views

Hi

Currently i have an change on an drop in a Grid and then i change some any data too, but i could not refresh grid after all my jquery changes

Regards

In first step i change an codeErreur with an dropdown then i change on others lines in grid same field, but i could not refresh my grid

 

    var getDatasourceFromUrlDetailEtatCompte = function (relativeUrl, schema) {
        return new kendo.data.DataSource({
            transport: {
                dataType: "json",
                read: {
                    url: UtilService.generateApiUrl(relativeUrl)
                }
            },
            change: function (e) {
                if (e.action === "itemchange") {
                    var errload = {
                        type: e.items[0].type,
                        source: e.items[0].source,
                        compte: e.items[0].compte,
                        date: e.items[0].date,
                        facture: e.items[0].facture,
                        total: e.items[0].total,
                        codeErreur: e.items[0].codeErreur
                    };
                    RapportsService.saveErreurEtatCompte(errload).then(function success(response) {
                        console.log('ChangementB:' + response);
                        e.items[0].dirty = false;

                        const ref_facture = e.items[0].facture;
                        const ref_source = e.items[0].source;
                        const ref_codeErreur = e.items[0].codeErreur;


                        var tgrid = e.sender._data;
                        for (var i = 0; i < tgrid.length; i++) {
                            if (tgrid[i].facture == ref_facture && tgrid[i].source != ref_source) {
                                tgrid[i].codeErreur = ref_codeErreur; // change same error code
                                var errload2 = {
                                    type: tgrid[i].type,
                                    source: tgrid[i].source,
                                    compte: tgrid[i].compte,
                                    date: tgrid[i].date,
                                    facture: tgrid[i].facture,
                                    total: tgrid[i].total,
                                    codeErreur: tgrid[i].codeErreur
                                };
                                RapportsService.saveErreurEtatCompte(errload2).then(function success(response2) {
                                }, function error(response2) {
                                    console.log('Error change:' + response2);
                                });

                            }
                        }

                        NotificationService.removeAll();
                        NotificationService.showSuccessP("global.save.success");

                    }, function error(response) {
                        console.log('Changementc:' + response);
                        if (!UtilService.responseValidationParsing(response)) {
                            NotificationService.showErrorP("global.save.error");
                        }
                    });
                }
            },
            schema: schema
        });
    };

Neli
Telerik team
 answered on 13 Jul 2021
1 answer
173 views

I created a kendo map and i'm using a openstreetmap, I also created a layer shape polygon with my coordinates but when I zoom, my shape disappears and I don't know why.

Maybe it is because my shape is not very large (about 1hectare).

I tried with more coordinates (about 100) but it is the same thing.

Should i change the map or just kendo can't zoom on little shape ?

This is my map with zoom 13 :

And with zoom 14, my shape disappears.

My code :

<script>
    $("#map").kendoMap({
   
             center: [48.471504, - 2.457585],
                zoom: 13,
                layers: [{
                    type: "tile",
                   urlTemplate: "http://#= subdomain #.tile.openstreetmap.org/#= zoom #/#= x #/#= y #.png",
            subdomains: ["a", "b", "c"]
                }, {
                    extent: [
                        48.499924, - 2.459692,
                        48.45, -2.479
                    ],
                    minZoom: 11,
                    type: "shape",
                    style: {
                        fill: {
                            opacity: 0
                        },
                        stroke: {
                            color: "red",
                            width: 2
                        }
                    },
                    dataSource: {
                        type: "geojson",
                        data: [{
                            "type": "Polygon",
                            "coordinates": [[ listCoordinates                        
                            ]]
                        }]
                    }
                }]
            });
</script>

How can i zoom and see my shape ?

Angel Petrov
Telerik team
 answered on 13 Jul 2021
1 answer
283 views

Hey!

I'm trying to update kendo-ui version to the latest. The initialization code stays the same:


import '@progress/kendo-ui/css/web/kendo.common.less'
import '@progress/kendo-ui/css/web/kendo.default.less'

require('@progress/kendo-ui/js/kendo.all');

It works fine until the version 2020.2.512. Starting from this version and higher "window.kendo" object is still available but jQuery does not contain any of kendo* methods (like $(...).kendoNotification)

So...what changed there?...

I'm using webpack to build the application, jQuery is the latest 3.*

~upd

window.kendo.jQuery has everything in place. But window.jQuery does not

Neli
Telerik team
 answered on 12 Jul 2021
4 answers
239 views

  1. Enable serverPaging, serverSorting, virtual scroll. Please refer the attached codes.
  2. Run the page in browser.
  3. Drag scrollbar to end
  4. Click "name" column header to sort the grid.

Observed:

Grid only shows the last 3 rows.

Question:

How can I make last ten rows show after sort? Like this:


<html>
	<head>

		<link rel="stylesheet" href="styles/kendo.common.min.css"/>
		<link rel="stylesheet" href="styles/kendo.default.min.css"/>

		<script src="jquery-3.6.0.js"></script>
		<script src="kendo.all.js"></script>

		<style>
			.grid {
				width: 800px;
				height: 400px;
			}
		</style>
	</head>
	<body>
		<div class="grid"></div>
<script>
	$(()=>{
	var ds = [];
	for(var i=0;i<13;i++){
		ds[i]={name:i.toString(),number:i};
	}

	var dataSource = new kendo.data.DataSource({
		serverPaging:true,
		serverSorting:true,
		pageSize:10,
		type: "odata",
		transport: {
			read: options=>{
				var d=[];
				for(var i =options.data.skip;i<options.data.skip+options.data.take && i<ds.length;i++){
					d.push(ds[i]);
				}

				var r = {
					d: {
						__count: ds.length,
						results: d
					}
				};

				options.success(r);
			}
		}
	});

	$(".grid").kendoGrid(
		{
			sortable:true,
			columns:["name","number"],
			dataSource:dataSource,
			scrollable: {
				virtual: true
			}
		}
	);
});
</script>
	</body>
</html>

Neli
Telerik team
 answered on 09 Jul 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?