Telerik Forums
Kendo UI for jQuery Forum
1 answer
47 views

Hi,

in here https://demos.telerik.com/kendo-ui/scheduler/timeline  I want to select a date range. For example, if I choose the start date, I want to select the second date only if it's greater than the first one, to form a range. I mean, I want to select the first cell, and then when I select the second cell, I want to have the range selected between them. I don't want to drag the mouse or use the Shift key to do it.

thanks

Martin
Telerik team
 answered on 18 Oct 2024
0 answers
66 views

Hi,

When cascading a Kendo dropdownlist in two stages, if you select the option label of the parent dropdownlist (value is null), the child dropdownlist will not be affected.

When selecting the option label of the parent dropdownlist

(e.g., when the parent dropdownlist is a country and the child is a list of cities, the parent's option label is to select all, and the child dropdownlist is to display cities of all countries)

 in the child dropdownlist Is there a way to catch and control this?

thanks

jayuob
Top achievements
Rank 1
 asked on 17 Oct 2024
1 answer
51 views

Is there a way to quickly insert multiple blank rows in the spreadsheet control? The insertRow function is too slow.

For example, Import the Excel file from the attachment into the spreadsheet control for testing. Inserting 1,000 rows is very slow.  

Martin
Telerik team
 answered on 15 Oct 2024
1 answer
84 views

Hi, I just updated from 2022.3.1109 to 2024.3.806 and noticed that the CustomButton method for editor tools no longer creates a class with the provided name. We previously used this as a way add custom images as button icons. It was also the only way to have a unique identifier for the button, which is it's own separate issue. I didn't see anything in the release notes about this functionality being removed so I'm wondering if this is a bug or if we are supposed to use some new method of adding custom button icons. I see there is an Icon method available but it seems to be for using existing telerik icons and I don't see any way to add our own.

This answer in this older question shows two methods, of which we were doing the latter:

https://www.telerik.com/forums/how-to-add-a-customized-button-or-image-button-to-editor-tools

I understand we could probably switch to using CustomTemplate instead, but that seems like added maintenance whenever the default kendo classes or styling changes since we want it to match the appearance of the built-in kendo buttons.

Mihaela
Telerik team
 answered on 11 Oct 2024
1 answer
56 views

Hi,

We are attempting to set the default values of new rows in a grid based on some user-specified filters. The desired functionality is that if, for example, the "Year Level" filter is set to "Year 1", when a new row is created it will have its Year Level value automatically set to Year 1 AND will be visible in an edit state in the grid. 

We have read the previous Q&A here, however this solution is not suitable as it makes ALL rows with no "Year Level" value become visible when a new row is created.

As the "edit" event does not seem to fire when creating a new row whilst filters are applied, the implementation we are attempting involves saving those filters when the "Add" button is clicked and then re-applying them after the row has been created. This mostly works, but the new row is inserted as an un-editable dirty record and clicking its "Edit" button does nothing.

The code below is a combination of a couple of different approaches. Any guidance would be greatly appreciated!

let currentEditRow;
let currentModel;

$(".k-grid-add").click(function () {
    var grid = $("#grid").data("kendoGrid");

    // Save the current filters before clearing them
    savedFilters = grid.dataSource.filter();
    grid.dataSource.filter([]); 

    // Add a new row and enter edit mode
    currentEditRow = grid.addRow(); 
    grid.editRow(currentEditRow); // Attempting to force new row into edit mode here does not work
});

$("#grid").kendoGrid({
    dataSource: ds,
    sortable: true,
    toolbar: ["create"],
    columns: [
        {
            field: "Yearlevel",
            sortable: false,
            title: "Year Level",
            editor: cmbEditorYearlevelForHomegroup,
            template: "#=Yearlevel?.Name ?? ''#",
            editable: isEditable
        },
        // Other columns here
        { command: ["edit", "destroy"], title: "Action", width: "180px" }],
    editable: "inline",
    edit: function (e) {
        currentEditRow = $(e.container); // Save reference to the editing row
        currentModel = e.model; // Save the current model

        if (e.model.isNew()) {
            var yearLevelDropdown = $("#yearLevel").data("kendoDropDownList");
            e.model.set("Yearlevel", { // Update the values in the new row based on the selected filters
                Code: yearLevelDropdown.value(),
                Id: 0,
                Name: yearLevelDropdown.text()
            });

            var grid = $("#grid").data("kendoGrid");
            if (savedFilters) {
                grid.dataSource.filter(savedFilters); // Re-apply the filters
            }
            if (currentEditRow && currentModel && currentModel.isNew()) {
                var grid = this;
                setTimeout(function () {
                    grid.editRow(currentEditRow); // Attempting to re-enter edit mode for the new row; this also does not work
                });
            }
        }
    }
});

Martin
Telerik team
 answered on 10 Oct 2024
2 answers
558 views
In kendo chart i have to apply some gradient image for plot area.can any one help ?
David
Top achievements
Rank 1
Iron
 answered on 10 Oct 2024
1 answer
32 views
I want an on-screen numeric keypad _ like a phone dialer _ where the user can press screen buttons _ to enter numbers _ like a hand-held calculator.   I suppose that I could create an array of buttons.  I am surprised that I do not see a widget already built.   What is the best way?  Comments would be appreciated.
Neli
Telerik team
 answered on 09 Oct 2024
1 answer
60 views
The tree view in the file manager control only shows folders and subfolders in the navigation pane.  Is it possible to also show files?
Neli
Telerik team
 answered on 07 Oct 2024
1 answer
64 views

Hello, I have noticed some changes on the structure of the Treeview component after version 2024.1.319 March 18, 2024

Classes like k-group and k-in seem to have been removed completely

For example, in previous version, the structure of a Treeview component would look like this:

<ul class="k-group k-treeview-group">
	<li class="k-treeview-item">
		<div class="k-treeview-top">
		         <span class="k-treeview-leaf k-in">TEST STRING</span>
		</div>
	</li>
</ul>

while now it would look like this:

<ul class="k-treeview-group">
	<li class="k-treeview-item">
		<div class="k-treeview-top">
			<span class="k-treeview-leaf">
				<span class="k-treeview-leaf-text">TEST STRING</span>
			</span>
		</div>
	</li>
</ul>

On release notes, I did not find any particular reference on these classes being removed

So my questions are:

  1. Have they been removed widely?
  2. Are there any other components that may still use these classes?
  3. Is there any form of documentation that contain these changes?

Thank you in advance

Martin
Telerik team
 answered on 04 Oct 2024
1 answer
78 views

Hi, I am using Telerik grid in Razor pages applications. I have main grid and Detail grid.

<script id="orderItemsTemplate" type="text/kendo-tmpl">
    @(
        Html.Kendo().Grid<OrderItemInfo>()
                        .Name("OrderItemsGrid_#=RowId#")  // Unique grid name using rowid
                        .Columns(columns =>
                        {
                            columns.Bound(o => o.ItemDescription).Title("Item Description").Width("20%");                           
                            columns.Bound(o => o.QtyDelivered).Title("Qty Delivered").Width(50).Hidden();
                            columns.Bound(o => o.OrderNo).Title("Order No").Width(90);
                          
                    })
                    .ToolBar(tb => tb.Columns())
                    .AllowCopy(true)
                    .Selectable(s => s.Enabled(true))
                    .Sortable()
                    .Events(events =>
                    {
                        events.DataBound("onOrderItemsGridDataBound");
                    })
                    .Size(ComponentSize.Small)
                    .Resizable(resize => resize.Columns(true))
                    .DataSource(dataSource => dataSource.Custom()
                        .ServerGrouping(false)
                        .ServerPaging(false)
                        .ServerFiltering(false)
                        .ServerAggregates(false)
                        .ServerSorting(false)
                    )
                    .ToClientTemplate()
            )
</script>

Problem:   .ToolBar(tb => tb.Columns()) is not working on Detail grid template. 

Mihaela
Telerik team
 answered on 03 Oct 2024
Narrow your results
Selected tags
Tags
+? more
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Anislav
Top achievements
Rank 6
Silver
Bronze
Bronze
Jianxian
Top achievements
Rank 1
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Jim
Top achievements
Rank 2
Iron
Iron
Nurik
Top achievements
Rank 2
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?