Telerik Forums
Kendo UI for jQuery Forum
1 answer
113 views

Hi, I need to know if there is a way to give an order to the elements that are placed in overlfow.

I would like to decide which elements to send to overflow first, then if there is a lack of space, move on to the other elements and so on.

Thank you!

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 27 Jun 2024
1 answer
165 views
I'm trying to add a column selector to the Kendo Tree List. I have it successfully working in the KendoGrid but when I use it in a treelist, I get a Jquery maximum call stack exceeded error when the kendoFilterMultiCheck is initialized. Do I need to do something differently for a Kendo Grid vs a Treelist? Here is my code:
function initKendoGridNestedColumnSelector(gridId, columnSelectorContainer) {
    if (!columnSelectorContainer) {
        $(`#${gridId}`).before(`<div id="columnChooser_${gridId}" class="column-selector"></div>`);
        columnSelectorContainer = `columnChooser_${gridId}`;
    }

    let grid;
    if ($(`#${gridId}`).hasClass("k-treelist")) {
        grid = $(`#${gridId}`).data("kendoTreeList");
    } else {
        grid = $(`#${gridId}`).data("kendoGrid");
    }

    let visibleColumns = [];
    let includedColumns = [];
    let columns = grid.columns;
    $.each(columns, function (index, column) {
        if (column.columns) {
            $.each(column.columns, function (indexLevel2, columnLevel2) {
                if (columnLevel2.columns) {
                    $.each(columnLevel2.columns, function (indexLevel3, columnLevel3) {
                        if (!columnLevel3.hidden) {
                            visibleColumns.push({ value: columnLevel3.field, operator: "eq", field: "field" });
                        }
                        if (!Object.prototype.hasOwnProperty.call(columnLevel3, "menu") || columnLevel3.menu) {
                            columnLevel3.display = `${columnLevel2.title} ${columnLevel3.title}`;
                            includedColumns.push(columnLevel3);
                        }
                    });
                } else {
                    if (!columnLevel2.hidden) {
                        visibleColumns.push({ value: columnLevel2.field, operator: "eq", field: "field" });
                    }
                    if (!Object.prototype.hasOwnProperty.call(columnLevel2, "menu") || columnLevel2.menu) {
                        columnLevel2.display = `${column.title} ${columnLevel2.title}`;
                        includedColumns.push(columnLevel2);
                    }
                }
            });
        } else {
            if (!column.hidden) {
                visibleColumns.push({ value: column.field, operator: "eq", field: "field" });
            }
            if (!Object.prototype.hasOwnProperty.call(column, "menu") || column.menu) {
                column.display = column.title;
                includedColumns.push(column);
            }

        }
    });
    let chooserDs = new kendo.data.DataSource({
        data: includedColumns,
        filter: {
            filters: visibleColumns,
            logic: "or"
        }
    });
    $(`#${columnSelectorContainer}`).kendoFilterMultiCheck({
        field: "field",
        itemTemplate: function (e) {
            if (e.field == "all") {
                return "<li class='k-item'><label class='k-label'><strong><input type='checkbox' /><span>#= all#</span></strong></label></li>";
            }
            return "<li class='k-item #= data.menu === false ? '' : ''#'><label class='k-label'><input type='checkbox' name='" + e.field + "' value='#=field#'/><span>#= (data.title) ? display : field #</span></label></li>";
        },
        dataSource: chooserDs,
        search: true,
        messages: {
            filter: translateText("Done", "Global"),
            selectedItemsFormat: "{0} " + translateText("Columns Selected", "Global"),
            clear: translateText("Hide All", "Global")
        },
        refresh: function (e) {
            if (e.sender.dataSource.filter()) {
                var columnsToShow = e.sender.getFilterArray();
                $.each(includedColumns, function (i, col) {
                    if (!col.field) {
                        return true;
                    }
                    if (col.field && columnsToShow.indexOf(col.field) > -1) {
                        grid.showColumn(col.field);
                    } else {
                        grid.hideColumn(col.field);
                    }
                });
            } else {
                var columns = includedColumns;
                $.each(columns, function (index, col) {
                    grid.hideColumn(col.field);
                });
            }
        }
    })
        .find(".k-i-filter")
        .removeClass("k-i-filter")
        .addClass("k-i-columns");
    $(`#${columnSelectorContainer}`).find(".k-grid-filter").attr("title", translateText("Select Columns", "Global"));
    $(`#${columnSelectorContainer}`).find(".k-grid-filter").attr("aria-label", translateText("Select Columns", "Global"));
    $(`#${columnSelectorContainer}`).find(".k-grid-filter").addClass("btn btn-link k-state-active");
    $(`#${columnSelectorContainer}`).find(".k-grid-filter").append(translateText("Select Columns", "Global"));

    function grid_columnHide(e) {
        let datasource = e.sender.dataSource;
        let column = e.column.field;
        let filter = datasource.filter();
        let index = null;
        if (filter && filter.filters) {
            index = findObjectIndexByProperty(filter.filters, "field", column);
        }
        if (index !== null) {
            datasource.filter([]);
            $(".k-grid-search input").val("");
        }
    }

    grid.bind("columnHide", grid_columnHide);
}

Martin
Telerik team
 answered on 27 Jun 2024
1 answer
181 views

Good afternoon,

I'm trying to integrate the FileManager component into an Oracle APEX application. I created a REST web service that generates the following JSON:

[
  {
    "name": "General",
    "isDirectory": true,
    "hasDirectories": true,
    "path": "folder",
    "extension": " ",
    "size": 90,
    "createdUtc": "/Date(1718637638946)/",
    "items": [
      {
        "name": "Test Folder 2",
        "isDirectory": true,
        "hasDirectories": false,
        "path": "folder/Test Folder 2",
        "extension": " ",
        "size": 8820,
        "createdUtc": "2024-06-18T20:56:13Z"
      },
      {
        "name": "TestFolder1",
        "isDirectory": true,
        "hasDirectories": false,
        "path": "folder/TestFolder1",
        "extension": " ",
        "size": 0,
        "createdUtc": "2024-06-07T19:52:48Z"
      },
      {
        "name": "File1.pdf",
        "isDirectory": false,
        "hasDirectories": false,
        "path": "folder/File1.pdf",
        "extension": ".pdf",
        "size": 689541,
        "createdUtc": "2024-06-07T19:52:37Z"
      },
      {
        "name": "File2.pdf",
        "isDirectory": false,
        "hasDirectories": false,
        "path": "folder/File2.pdf",
        "extension": ".pdf",
        "size": 312498,
        "createdUtc": "2024-06-07T19:52:37Z"
      },
      {
        "name": "File3.xlsx",
        "isDirectory": false,
        "hasDirectories": false,
        "path": "folder/File3.xlsx",
        "extension": ".xlsx",
        "size": 107150,
        "createdUtc": "2024-06-07T19:52:38Z"
      },
      {
        "name": "File4.msg",
        "isDirectory": false,
        "hasDirectories": false,
        "path": "folder/File4.msg",
        "extension": ".msg",
        "size": 376832,
        "createdUtc": "2024-06-07T19:52:37Z"
      }
    ]
  }
]

When the page loads, the component is rendered correctly (See the "General" folder in the following image):

However, when I click on the tree viewer (or double click on the folder in the right side) to view its contents, the result is a duplicated "General" folder. If I continue to select any of these folders, it keeps duplicating them:

In the network tab I see that when I selected the folder, two calls were made to the URL I defined in the dataSource.transport, this time adding some extra parameters (path/target and target):


This is the code to initialize the File Manager:

$("#filemanager").kendoFileManager({
    dataSource: {
        schema: kendo.data.schemas.filemanager,
        transport: {
            read: {
                url: "https://myservice/teams",
                method: "GET",
                dataType: "json"
            }
        }
    }
});

Could you please help me understand what am I missing or doing wrong?

As an additional question, I'd like to include in the JSON one more parameter (a download URL) that I'd like to use in the Context Menu, so when I right click on top of a file I select the option to download it. To accomplish this, do I need to modify completely the dataSource.schema? Or can I just simply add the URL to the JSON and then reference its value in the contextMenu.items array? Or (even better) does the File Manager has a built-in function to download files?

Thank you very much!

 

Martin
Telerik team
 answered on 26 Jun 2024
1 answer
239 views

I have followed all the examples but nothing is overriding the default theme.  I even tried to change it in after everything is loaded inside my done routine.

 

function createTreeView(dataURL,divName) {
    $.ajax({
        type: 'GET',
        url: dataURL,
        dataType: "json",
        contentType: "application/json; charset=utf-8",
        success: function (data) {},
        error: function (request, error) {
            console.log(error);
        }
    }).done(function(data) {
         ds = new kendo.data.HierarchicalDataSource({
            data: data,
            schema: {
                model: {
                    id: "taskid",
                    children: "items",
                    hasChildren: "haschildren"
                }
            }
        });    
        $("#"+divName).kendoTreeView({
            dataSource: ds,
            dataTextField: "taskname",
            dataUrlField: "linkto"
        });
        $('.k-treeview').css('background', 'lightblue');
    })// end done
}

 

 

Neli
Telerik team
 answered on 25 Jun 2024
1 answer
257 views

I inherited an old MVC application that uses Kendo UI web version which I cannot find on Nuget. The application contains version 2013.2.716, and I can see CSS files and scripts in the correct folder. However, when I try to build the application, I encounter an error. Can someone please help me with this issue?


  Error NuGet Package restore failed for project ATG.JourneyDesk.ImageLibrary: Unable to find version '2013.2.716' of package 'KendoUIWeb'.
  https://api.nuget.org/v3/index.json: Package 'KendoUIWeb.2013.2.716' is not found on source 'https://api.nuget.org/v3/index.json'.
  https://nuget.telerik.com/v3/index.json: Package 'KendoUIWeb.2013.2.716' is not found on source 'https://nuget.telerik.com/v3/index.json'.
. Please see Error List window for detailed warnings and errors.

 

Neli
Telerik team
 updated answer on 25 Jun 2024
1 answer
265 views

Hi,

I am currently working with a Kend UI spreadsheet control, and was wondering if there was a way to disable ALL editing for the sheetsbar, or sheets tab:

  • No deletion of existing sheets
  • No adding new sheets
  • No name changes

I found this approach on the forum:

Remove insert and delete on SheetsBar with CSS and jQuery | Kendo UI Dojo (telerik.com)

Using the css and jQuery stuff, additionally I need to turn off the ability to change the name.

Alternatively I came up with kind of a clunky solution, using a Kendo Drop Down list to select the active sheet...but I think it would be much more intuitive to leave the tabs there and just disable the renaming functionality.

DDL Select Active: | Kendo UI Dojo (telerik.com)

but this is clunky, and I am hoping for a cleaner solution based on the first example I found... I may start fiddling with the above approach to see if it is possible, if so, wondering if there is a certain syntax with the Kendo UI controls, sooo much to dig through... that would help me disable and enable features of other components...maybe there is a guide...and since I am kind of new... thinking maybe I haven't stumbled on the naming convention of thecss controls.. and how they can affect the enabling and disabling of different features in the controls/components?

I usually look for an option, like yeah you can set sheetsbar to false and make it disappear or hide it, but I kind of like having it there since the end product is going to populate the spreadsheet control with multiple sheets...and thereby make the controls more intuitive.

Thanks for your help and patience ^___^

George

P.S.

I was hoping some sort of css approach like this would be possible, but then I dunno if you can control css to disable functionality, other than hide something...


George
Top achievements
Rank 3
Bronze
Bronze
Iron
 updated answer on 20 Jun 2024
1 answer
153 views

Description

The jQuery Kendo Map component is not functioning as expected in Firefox version 126.0. Specifically, the map cannot be moved or panned, which is a critical functionality for our application.

Steps to Reproduce

  1. Open Firefox 126.0.
  2. Navigate to the Kendo Map example page (URL: https://demos.telerik.com/kendo-ui/map/index).
  3. Attempt to click and drag to move the map.

Thank you for your attention to this matter.

Martin
Telerik team
 answered on 20 Jun 2024
0 answers
111 views

Inside Adobe PDF viewer, for a PDF that exported from my Kendo App Grid, 
the DOCUMENT PROPERTIES says: 

PDF Producer: Kendo UI PDF Generator
PDF Version 1.4

Is this the latest?

jaymer
Top achievements
Rank 1
 asked on 20 Jun 2024
0 answers
182 views

I have downloaded the newest version of kendo ui 2024.2.514 and downloaded the @progress/kendo-svg-icons seperately. I am having an issue with getting the icon to render properly I tried importing using "import * as svgIcons from './@progress/kendo-svg-icons/dist/index.js';" fixed the error of forbidden access. I believe the issue is when related to the import of svgIcons.

If someone could point me in the right direction that would be great.

derrick
Top achievements
Rank 1
 asked on 18 Jun 2024
1 answer
199 views

I have a Kendo UI jQuery grid (2022.2.802) that may have hundreds of rows. Two columns in each row need to be editable dropdownlists. After the user has finished making all of their edits, they will click a button on the page to submit their changes. I don't want an API call every time a user changes something. I want them to actively click a submit button. The data source is a local JavaScript array of objects. I tried just using the template to create the dropdown lists, but due to the number of rows, this slows down the page load too much. I also don't want them to have to click in the cell twice to open the dropdown list. I would prefer that they just click in the cell and it immediately opens the dropdown. How do I solve these issues? 

  1. Have to click twice in cell to open dropdown (solved with edit function)
  2. Sorting name doesn't work since the value has to be an object to make the dropdown work
  3. Selecting "None" throws a console error
  4. Clicking on a cell with "None" automatically selects the first item in the dropdownlist

Here is a Dojo with my attempt but it isn't quite working: 
https://dojo.telerik.com/@dojolee/EJUBijuN

Martin
Telerik team
 answered on 18 Jun 2024
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Drag and Drop
Application
Map
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?