Telerik Forums
Kendo UI for jQuery Forum
1 answer
687 views

How to use kendo Stepper with Upload Image.

Example:

I want step 1 is Upload Image. Then Step 2 is Show this Image and Input information this Image

Aleksandar
Telerik team
 answered on 03 May 2021
1 answer
557 views

I'm using a KendoPDFViewer component, and it works fine.

I want to enable selection by default, so that the use don't need to enable it manually. 

I want to know in the following code snipet, how can i set "Enable Selection" property to true?

function createPdfViewer($elem) {
	$.when(
		$.getScript("https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.js"),
		$.getScript("https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.worker.js")
	).done(function () {
		window.pdfjsLib.GlobalWorkerOptions.workerSrc = 'https://cdnjs.cloudflare.com/ajax/libs/pdf.js/2.2.2/pdf.worker.js';
	}).then(function () {
		$elem.kendoPDFViewer({
			pdfjsProcessing: {
				file: $elem[0].dataset.filename
			},
			width: $elem[0].dataset.width,
			height: $elem[0].dataset.height
		}).data("kendoPDFViewer");
	});
}

Aleksandar
Telerik team
 answered on 03 May 2021
6 answers
1.2K+ views

I have added a custom class to each td in a kendoGrid, to display a different color in cells that are readonly.

But when I run this: $("myGrid").data("kendoGrid").refresh();

it removes the class from the current row.

Is there a way to prevent this from happening?

Tsvetomir
Telerik team
 answered on 03 May 2021
1 answer
309 views

Hello,

I am trying Kendo UI to see if we can use it in our projects.

This is my first attempt to load a grid. The WebAPI method gets hit but, the parameters on the WebAPI side are showing as null.

Can anyone let me know what needs to be changed here?


 var costCenter = {

                        Contract_StartDate : '01/01/2021',  
                        Contract_EndDate : '05/01/2021'
                        Grant_ID : 750  
                    }
       
                            
       
         var crudServiceBaseUrl = 'http://localhost:55383/api/CostCenterSetup',
             dataSource = new kendo.data.DataSource({
                 
                    transport: {
                        read: {
                            url: crudServiceBaseUrl + "/GetCostCenterDataForEdit",
                            type:"POST",
                            data: function () {
                                alert(costCenter.Contract_StartDate);
                                return costCenter
                            },
                                //{
                                //    Contract_StartDate: "01/01/2021", 
                                //    Contract_EndDate : "05/01/2021",
                                //    Grant_ID: "750"  
                                //}                            ,    
                            contentType : "application/json",
                            dataType: "json"
                        },
                        //,
                        //update: {
                        //    url: crudServiceBaseUrl + "/UpdateCostCenterInfo",
                        //    dataType: "jsonp"
                        //},
                        //destroy: {
                        //    url: crudServiceBaseUrl + "/DeleteCostCenterInfo",
                        //    dataType: "jsonp"
                        //},
                        parameterMap: function (options, operation) {
                            if (operation !== "read" && options.models) {
                                return { models: kendo.stringify(options.models) };
                            }
                        }
                    },
                    batch: true,
                    pageSize: 20,
                    autoSync: true,
                    aggregate: [{
                        field: "TotalSales",
                        aggregate: "sum"
                    }],
                    group: {
                        field: "Category.CategoryName",
                        dir: "desc",
                        aggregates: [
                            { field: "TotalSales", aggregate: "sum" }
                        ]
                    },
                    schema: {
                        model: {
                            id: "CostCenterID",
                            fields: {
                                CostCenterID: { editable: false, nullable: true },
                                CostCenter_Name: { type: "string", editable: false },
                                Grant_ID: { type: "string", editable: false },
                                Fund_ID: { type: "string", editable: false },
                                Department_ID: { type: "string", editable: false },
                                Program_ID: { type: "string", editable: false },                               
                                //Fund: {
                                //    defaultValue: {
                                //        FundID: -1,
                                //        FundName: "---Select---"
                                //    }
                                //},
                                //Grant: {
                                //    defaultValue: {
                                //        GrantID: -1,
                                //        Grant: "---Select---"
                                //    }
                                //},
                                //Department: {
                                //    defaultValue: {
                                //        DepartmentID: -1,
                                //        Department: "---Select---"
                                //    }
                                //},
                                //Program: {
                                //    defaultValue: {
                                //        ProgramID: -1,
                                //        Program: "---Select---"
                                //    }
                                //}
                            }
                        }
                    }
                });

        function Loadgrid() {

                $("#kuiGrid").kendoGrid({
                        dataSource: dataSource,
                        columnMenu: {
                            filterable: false
                        },
                        height: 680,
                        editable: "incell",
                        pageable: true,
                        sortable: true,
                        navigatable: true,
                        resizable: true,
                        reorderable: true,
                        groupable: true,
                        filterable: true,
                        toolbar: ["excel", "pdf", "search"],
                        columns: [{
                            selectable: true,
                            width: 75,
                            attributes: {
                                "class": "checkbox-align",
                            },
                            headerAttributes: {
                                "class": "checkbox-align",
                            }
                        }, {
                            field: "CostCenterID",
                            title: "CostCenterID",
                            //format: "{0:c}",
                            width: 105
                        },{
                            field: "CostCenter_Name",
                            title: "CostCenter_Name",
                           // template: "<div class='product-photo' style='background-image: url(../content/web/foods/#:data.ProductID#.jpg);'></div><div class='product-name'>#: ProductName #</div>",
                            width: 300
                        }, {
                            field: "Grant_ID",
                            title: "GrantID",
                            //format: "{0:c}",
                            width: 105
                        }, {
                            field: "Fund_ID",
                            title: "Fund ID",
                            //template: "<span id='badge_#=ProductID#' class='badgeTemplate'></span>",
                            width: 130,
                        },  {
                            field: "Department_ID",
                            title: "DepartmentID",
                            width: 105
                        }, {
                            field: "Program_ID",
                            title: "ProgramID",
                            //format: "{0:c}",
                            width: 140
                            //aggregates: ["sum"],
                        },{
                            field: "Fund",
                            title: "Fund List",
                            editor: clientFundEditor,
                            //groupHeaderTemplate: "Category: #=data.value#, Total Sales: #=kendo.format('{0:c}', aggregates.TotalSales.sum)#",
                            width: 125
                        }, {
                            field: "Grant",
                                title: "Grant List",
                            //editor: clientCategoryEditor,
                            //template: "<input id='rating_#=ProductID#' data-bind='value: CustomerRating' class='rating'/>",
                            //editable: returnFalse,
                            width: 140
                        }, {
                            field: "Department",
                            title: "Department List",
                            //template: "<div class='k-text-center'><img src='../content/web/country-flags/#:data.Country.CountryNameShort#.png' alt='#: data.Country.CountryNameLong#' title='#: data.Country.CountryNameLong#' width='30' /></div>",
                            //editor: clientCountryEditor,
                            width: 120
                        }, {
                            field: "Program",
                                title: "Program List",
                            //editor: clientCategoryEditor,
                            //format: "{0:c}",
                            //template: "<span id='chart_#= ProductID#' class='sparkline-chart'></span>",
                            width: 220
                        },
                        { command: "destroy", title: "&nbsp;", width: 120 }],
                    });
                //});

        }

       

        function clientFundEditor(container, options) {
            $('<input required name="Country">')
                .appendTo(container)
                .kendoDropDownList({
                    dataTextField: "FundName",
                    dataValueField: "FundID",
                    dataSource: {
                        transport: {
                            read: {
                                 url: 'http://localhost:55383/api/Lookups/GetFunds',
                                 data: {
                                    CID: 'CONAME',
                                    TableName: 'Lkup_Funds'
                                 },
                                 dataType: "jsonp"
                            }
                        }
                    },
                    autoWidth: true
                });
        }


 

 

Web API  Code:

 


[System.Web.Http.Route("api/CostCenterSetup/GetCostCenterDataForEdit")]
        [System.Web.Http.HttpPost]
        public List<CostCenter> GetCostCenterDataForEdit(CostCenterEdit costCenterDetails)
        {}

 public class CostCenterEdit
    {
        
        public string Contract_StartDate { get; set; }

        public string Contract_EndDate { get; set; }
        public string Grant_ID { get; set; }
    }

 

Tsvetomir
Telerik team
 answered on 03 May 2021
4 answers
252 views

I have a requirement to print a pie chart on a small area. I modified most of the fonts, margins and paddings to make it fit and I got to the connectors. Is there a way to modify the length of connectors?

The problem is that some of the labels are outside of the chart and I was hopping that if I reduce the length of the connectors I can make it fit.

https://dojo.telerik.com/aPuLiPiB

You can see in the above dojo that some categories are outside of the chart area and some are overlaid on the legend

The reason I need to display the chart on that small area is because it needs to be printed and that is the allocated area on the printed paper.

Nikolay
Telerik team
 answered on 03 May 2021
1 answer
167 views

I am using the kendo- scheduler jquery component in my project. Recently I updated the version of the kendo library, I am currently using 

   "@progress/kendo-ui""2021.1.330"

There were customization styles I have done on the component depending on the kendo styling class ex: "k-header", "k-scheduler-navigation", and many more... 

After the update many of my customization styles have lost, Are there any changes done to class names and element types or, element order or any other changes contained in the above update or any later update recently ???? 

Ivan Zhekov
Telerik team
 answered on 30 Apr 2021
1 answer
153 views

Hi,

 

I have a similar post here https://www.telerik.com/forums/ideas-for-visualisation where we discuss the problem but the crux of the matter is that we want to be able to change the labels on a stacked bar chart after the render process.  Does anyone know if this is possible?

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 29 Apr 2021
1 answer
157 views

Hi 

We are using a kendo grid with a WCF service to load data in the grid. The grid has sorting, filtering and paging, we are getting 404 error due to long query strings that add the filters for EF behind the scene. These query strings are unmanageable, can you please suggest a way to reduce it and make it work for all clients.

https://xyz.net/DataService/Service.svc/vw_DataPending?$callback=jQuery33105090844870624116_1619444376254&%24inlinecount=allpages&%24format=json&%24top=20&%24orderby=EncounterDate&%24filter=(PracticeLocationsId%20eq%201%20or%20PracticeLocationsId%20eq%204%20or%20PracticeLocationsId%20eq%2016%20or%20PracticeLocationsId%20eq%2020%20or%20PracticeLocationsId%20eq%2025%20or%20PracticeLocationsId%20eq%20111%20or%20PracticeLocationsId%20eq%2092%20or%20PracticeLocationsId%20eq%2010%20or%20PracticeLocationsId%20eq%205%20or%20PracticeLocationsId%20eq%206%20or%20PracticeLocationsId%20eq%207%20or%20PracticeLocationsId%20eq%208%20or%20PracticeLocationsId%20eq%209%20or%20PracticeLocationsId%20eq%2017%20or%20PracticeLocationsId%20eq%2018%20or%20PracticeLocationsId%20eq%2019%20or%20PracticeLocationsId%20eq%2021%20or%20PracticeLocationsId%20eq%2022%20or%20PracticeLocationsId%20eq%2023%20or%20PracticeLocationsId%20eq%2024%20or%20PracticeLocationsId%20eq%2032%20or%20PracticeLocationsId%20eq%2039%20or%20PracticeLocationsId%20eq%2040%20or%20PracticeLocationsId%20eq%20112%20or%20PracticeLocationsId%20eq%2026%20or%20PracticeLocationsId%20eq%2027%20or%20PracticeLocationsId%20eq%2029%20or%20PracticeLocationsId%20eq%2030%20or%20PracticeLocationsId%20eq%20114%20or%20PracticeLocationsId%20eq%2043%20or%20PracticeLocationsId%20eq%2035%20or%20PracticeLocationsId%20eq%2031%20or%20PracticeLocationsId%20eq%2034%20or%20PracticeLocationsId%20eq%2041%20or%20PracticeLocationsId%20eq%2042%20or%20PracticeLocationsId%20eq%2038%20or%20PracticeLocationsId%20eq%20115%20or%20PracticeLocationsId%20eq%2037%20or%20PracticeLocationsId%20eq%2053%20or%20PracticeLocationsId%20eq%2054%20or%20PracticeLocationsId%20eq%2055%20or%20PracticeLocationsId%20eq%2056%20or%20PracticeLocationsId%20eq%2057%20or%20PracticeLocationsId%20eq%20119%20or%20PracticeLocationsId%20eq%2036%20or%20PracticeLocationsId%20eq%2033%20or%20PracticeLocationsId%20eq%20118%20or%20PracticeLocationsId%20eq%2058%20or%20PracticeLocationsId%20eq%2059%20or%20PracticeLocationsId%20eq%20113%20or%20PracticeLocationsId%20eq%20116%20or%20PracticeLocationsId%20eq%20120%20or%20PracticeLocationsId%20eq%20121%20or%20PracticeLocationsId%20eq%2060%20or%20PracticeLocationsId%20eq%2062%20or%20PracticeLocationsId%20eq%2063%20or%20PracticeLocationsId%20eq%2067%20or%20PracticeLocationsId%20eq%2083%20or%20PracticeLocationsId%20eq%2084%20or%20PracticeLocationsId%20eq%2074%20or%20PracticeLocationsId%20eq%2073%20or%20PracticeLocationsId%20eq%2070%20or%20PracticeLocationsId%20eq%2069%20or%20PracticeLocationsId%20eq%2064%20or%20PracticeLocationsId%20eq%2065%20or%20PracticeLocationsId%20eq%2066%20or%20PracticeLocationsId%20eq%2072%20or%20PracticeLocationsId%20eq%2068%20or%20PracticeLocationsId%20eq%2075%20or%20PracticeLocationsId%20eq%2081%20or%20PracticeLocationsId%20eq%2093%20or%20PracticeLocationsId%20eq%2061%20or%20PracticeLocationsId%20eq%2076%20or%20PracticeLocationsId%20eq%2077%20or%20PracticeLocationsId%20eq%2078%20or%20PracticeLocationsId%20eq%2079%20or%20PracticeLocationsId%20eq%2080%20or%20PracticeLocationsId%20eq%2082%20or%20PracticeLocationsId%20eq%2085%20or%20PracticeLocationsId%20eq%2086%20or%20PracticeLocationsId%20eq%2087%20or%20PracticeLocationsId%20eq%2094%20or%20PracticeLocationsId%20eq%2095%20or%20PracticeLocationsId%20eq%2096%20or%20PracticeLocationsId%20eq%2098%20or%20PracticeLocationsId%20eq%20100%20or%20PracticeLocationsId%20eq%2099%20or%20PracticeLocationsId%20eq%20101%20or%20PracticeLocationsId%20eq%20102%20or%20PracticeLocationsId%20eq%20103%20or%20PracticeLocationsId%20eq%20104%20or%20PracticeLocationsId%20eq%20105%20or%20PracticeLocationsId%20eq%20106%20or%20PracticeLocationsId%20eq%20107%20or%20PracticeLocationsId%20eq%20108%20or%20PracticeLocationsId%20eq%20109%20or%20PracticeLocationsId%20eq%20110%20or%20PracticeLocationsId%20eq%2089%20or%20PracticeLocationsId%20eq%2088%20or%20PracticeLocationsId%20eq%2090%20or%20PracticeLocationsId%20eq%2091%20or%20PracticeLocationsId%20eq%20123%20or%20PracticeLocationsId%20eq%20124%20or%20PracticeLocationsId%20eq%20125%20or%20PracticeLocationsId%20eq%20126%20or%20PracticeLocationsId%20eq%20128%20or%20PracticeLocationsId%20eq%20129)

Anton Mironov
Telerik team
 answered on 29 Apr 2021
8 answers
644 views

I have a client who requested when a kendo control can't validate, the focus is kept on the invalidate object.
This is something that to my knowledge isn't supported by default by the components.

So i've tried something like writing a validation rule like this (raw example, won't work)

rule :function(input){
    var isValid = false;
     //some code to do validation
     if(!isValid){
        var kendoComponent = $(input.id).data("kendoCombobox");
        input.focus();
    }
    return isValid
}

 

The problem i'm having is that before input.focus(), the next component shortly ahs focus, and by setting the focus to the invalidate compinent, the next components validation is triggered as well. The next component says it's invalid, and thus calls for the focus. Creating an endless loop between these 2 components each asking for focus.

To try and counter this, i've kept a dominantfield status. If the validation is triggerd for a none dominant component, that component should always say "i'm valid" thus not calling for focus. As far is i can determine following stacktraces and output logging, this code is working, though somewhere focus is still being called on the second component causing an infinite loop. while the custom code i wrote in my validation ruls never call .focus() on the second component. I can't figure out why the components would still keep trying to get focus. or why in the telerik js code, an infite loop would be created.

Any thoughts on why this infinte loop could be created, or any input as how else this functionality can be obtained?

Neli
Telerik team
 answered on 29 Apr 2021
1 answer
107 views

Hello, when did the SearchPanel "search" command become a built in command for the grid toolbar:

https://docs.telerik.com/kendo-ui/api/javascript/ui/grid/configuration/toolbar

I'm using a 3rd party tool that uses kendo.version: 2018.3.1219

When I pass in the "search" command, it just creates a search button, does not create the search box:

 

toolbar: ["excel", "pdf", "search"],


Was that search panel built into the library during a later release?

 

 

Ivan Danchev
Telerik team
 answered on 28 Apr 2021
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
Application
Map
Drag and Drop
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
AICodingAssistant
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?