Telerik Forums
Kendo UI for jQuery Forum
0 answers
1 view

I am trying to export a <ul> element in pdf using the drawDom.drawing.pdf.saveAs(...) method (kendo.drawing.pdf.saveAs(grid, test.pdf"))) with the following parameters :

grid.options.set("pdf", {
                forcePageBreak: ".pageBreak",
                allPages: true,
                avoidLinks: true,
                multiPage: true,
                
                margin: {
                    left: "20mm",
                    right: "20mm",
                }
            });

But even with the class "pageBreak" being properly added to my elements it still doesn't work properly. My pdf page doesn't separate into different pages. And if I add a paperSize:"A4" for example, the pdf becomes blank.

 

dominic
Top achievements
Rank 1
 asked on 15 Oct 2021
1 answer
8 views

Hello, I'm having trouble using Kendo-grid. I don't know how to make my app remember the column reordering positions. As soon as I refresh the page, it resets to the old value. I haven't found anything even remotely useful on SO. The delete column works fine, when i delete a column it stays deleted until i decide to restore it applinked app. I know there's an event called ColumnReorderEvent, but I don't know how to use it in a way to save the reordered grid as the new default for the user that reordered it.

Nikolay
Telerik team
 answered on 15 Oct 2021
1 answer
3 views

I have an element need to inited both Draggable and Toolips, and I want to prevent tooltips show event when dragend, I use e.preventdefault() , but it don't work.

The version I'm using is 2017.3.913

For some reason, I can't update to the latest.

My  html

<div class="edit-tooltips" style="left: ${xPx};top: ${yPx}">
        <div class="sensor-point new-point" > content
          ${ index }
        </div>
</div>

My js

$(".edit-tooltips").kendoTooltip({
   autoHide:false,
   showOn: "click"
  .....
})


$(".sensor-point").kendoDraggable({
        hint: (element)=>{
             return ....
        },
        dragstart: (e:any)=>{

        },
        dragend: (e:any)=> {
           ....
          e.preventDefault()  // this dot'n work, tooltips show event will still be triggered
        }
      })

Veselin Tsvetanov
Telerik team
 answered on 15 Oct 2021
0 answers
3 views

Hi,

I have a Kendo grid on a page that is created using this code in my cshtml file

 @(Html.Kendo().Grid<Entity>()
        .Name("productsGrid")
        .Columns(columns =>
        {
            columns.Bound(schema => schema.Ns).Width(150)
                .Filterable(false).Sortable(false);
            columns.Bound(schema => schema.Name).Title("Entity Name").Width(250);
            columns.Bound(schema => schema.Desc).Title("Description")
                .ClientTemplate("#= preserveDirtyFlag(data, data.Desc) #")
                .Filterable(false).Sortable(false);
        })
        .Editable(editable => editable.Mode(GridEditMode.InCell))
        .Sortable()
        .DataSource(dataSource => dataSource
            .Ajax()
            .Batch(true)
            .ServerOperation(true)
            .PageSize(100)
            .Model(model =>
            {
                model.Id(entity => entity.Id);
                model.Field(entity => entity.Ns).Editable(false);
                model.Field(entity => entity.Name).Editable(false);
                model.Field(entity => entity.Desc);
            })
            .Read(read => read.Action("GetEntityList", "Products").Data("getQuery"))
            .Events(e => e.RequestStart("onPageChange"))
        )
        .Events(e => e.DataBound("onDataBound"))
        .ClientDetailTemplateId("fieldDescriptions")
)

Everything works perfectly fine on first load. 

The pagination works perfectly (have removed the code for that from above). Even the filtering works smoothly. super smooth.

The only issue is with sorting. 

---

As the code shows that sorting is enabled on the single column: 'Entity name'

As soon as that column title is clicked in order to sort the data, the browser redirects to a new URL

earlier it was at

/CatalogManager/Descriptions

but after clicking on the 'Entity Name' in order to sort that table, it redirects to:

/CatalogManager/Descriptions/GetEntityList?sortField=Relevancy&sortFieldValue=_score&descriptionsGrid-sort=Name-desc

and then shows the pure JSON output that the GetEntityList controller returns instead of rendering in the grid.

Why does filtering and pagination work well but sorting breaks the page?

---

The amazing thing is, if I remove the '/GetEntityList' from the url manually and just navigate to:

/CatalogManager/Descriptions?sortField=Relevancy&sortFieldValue=_score&descriptionsGrid-sort=Name-desc

Then the table is displayed in its full glory sorted by the required field. So they question is, why does it navigate to the API url and display the raw JSON data in the first place?

Kapeel
Top achievements
Rank 1
 asked on 14 Oct 2021
0 answers
3 views

Hi,

Can I set different shapes for different task types? E.g.  hexagon or circle.

Mariam
Top achievements
Rank 1
Iron
Veteran
Iron
 asked on 14 Oct 2021
1 answer
4 views

I have a grid with multiple selection with checkboxes.  I need to be able to deselect the checkbox on a single row programatically.  I am able to turn off the row selection class using 

$(row).removeClass("k-state-selected");

but I have so far been unable to uncheck the corresponding checkbox.  

Thanks in advance.

Eric Katz

Martin
Telerik team
 answered on 14 Oct 2021
0 answers
1 view

Hi,

We want multiple tabstrip depending on user selection. In that tabstrip want multiple grid. Is there sample code in angularJS for this problem.

Thanks!

Bal
Top achievements
Rank 1
 asked on 14 Oct 2021
0 answers
4 views

Hi Telerik,

The requirement is to have a vertical or horizontal separator inside tilelayout.

Is there a way to apply it?

Afandi
Top achievements
Rank 1
Veteran
 asked on 14 Oct 2021
2 answers
7 views

Hi,

In the gridconfig I use the following code:

			group: function (e) {

				if (e.groups.length) {
					localStorage["ndo-grid-options"] = kendo.stringify(e.sender.getOptions());
				} else {
					localStorage["ndo-grid-options"] = '';
				}
			},
In document.ready:
		var options = localStorage["ndo-grid-options"];
		var grid = $('#grid').data('kendoGrid');

		if (options) {
			grid.setOptions(JSON.parse(options));
		}

But it is not working 100% as expected. Probably I am doing something wrong. Please take a look at the Loom video below.

https://www.loom.com/share/89708bc87e5449ecb55f4eb8a4b9637e

Thanks, Roel

Roel
Top achievements
Rank 1
Iron
Veteran
Iron
 answered on 14 Oct 2021
0 answers
4 views
 

I use Kendo UI for build my single page web application. My application will add a tab when user click some menu if this menu will not in a tab list. I have a problem with my application when i use app in a period of time, the app gradually slow and slower. I found the reason is because when i add a new tab (with some kendoUI widget), the document will create some sub element in the end of document and i close the tab the widget in tab removed but the sub element will alive so the size of document increase by time used. 

Example 1 sub element:

<div class="k-list-container k-popup k-group k-reset" id="pfe6ef2c-9926-45e3-ac6d-8dcb5bb0855b-list" data-role="popup" style="display: none; position: absolute;" aria-hidden="true"><div class="k-group-header" style="display:none"></div><div class="k-list-scroller" unselectable="on"><ul unselectable="on" class="k-list k-reset" tabindex="-1" aria-hidden="true" id="pfe6ef2c-9926-45e3-ac6d-8dcb5bb0855b_listbox" aria-live="off" data-role="staticlist" role="listbox"><li tabindex="-1" role="option" unselectable="on" class="k-item k-state-focused" aria-selected="false" data-offset-index="0" id="dd8303f9-e1d7-4a3a-8e57-fb1478a5d9e0">20</li><li tabindex="-1" role="option" unselectable="on" class="k-item" aria-selected="false" data-offset-index="1">35</li><li tabindex="-1" role="option" unselectable="on" class="k-item" aria-selected="false" data-offset-index="2">50</li><li tabindex="-1" role="option" unselectable="on" class="k-item" aria-selected="false" data-offset-index="3">100</li></ul></div><div class="k-nodata" style="display:none"><div>No data found.</div></div></div>

Is there any solution to when remove the widget from document, the sub element removed too?

Phuong
Top achievements
Rank 1
 asked on 14 Oct 2021
Narrow your results
Selected tags
Tags
+? more
Top users last month
JG
Top achievements
Rank 2
Iron
ixen
Top achievements
Rank 1
Iron
Iron
Iron
Jana
Top achievements
Rank 2
Iron
Iron
Iron
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Roland
Top achievements
Rank 1
Veteran
Iron
Top users last month
JG
Top achievements
Rank 2
Iron
ixen
Top achievements
Rank 1
Iron
Iron
Iron
Jana
Top achievements
Rank 2
Iron
Iron
Iron
Matthias
Top achievements
Rank 5
Bronze
Bronze
Iron
Roland
Top achievements
Rank 1
Veteran
Iron