Telerik Forums
Kendo UI for jQuery Forum
1 answer
924 views

I want to load positions based on selected employee.

Index.Cshtml

$("#employees").kendoMultiSelect({
                placeholder: "Select employees...",
                dataTextField: "EmployeeFullName",
                dataValueField: "EmployeeId",
                autoBind: false,
                filter: "contains",
                dataSource: { 
                    serverFiltering: true,
                    transport: { 
                        read: baseUrl + "Schedules/GetEmployees_New",
                    }
                }
            }).data('kendoMultiSelect');
             
           $("#positions").kendoMultiSelect({
                placeholder: "Select positions...",
                dataTextField: "Code",
                dataValueField: "PositionId",
                autoBind: false,
                filter: "contains",
                dataSource: {
                    serverFiltering: true,
                    transport: {
                        read: baseUrl + "Schedules/GetPositions_New",
                        data: function () {
                           return {
                                IDs : $("#employees").data('kendoMultiSelect').value().join() //I am not getting this value in controller
                            };
                        }
                    }
                }
            }).data('kendoMultiSelect');

 

SchedulesController.cs

        public ActionResult GetEmployees_New(Filters filter, string IDs)
        {
            return Json(ReturnData, JsonRequestBehavior.AllowGet);
        }
        public ActionResult GetPositions_New(Filters filter, string IDs)
        {
            // I am not getting employee value in IDs parameter.
            return Json(ReturnData, JsonRequestBehavior.AllowGet);
        }

 

Model
    public class Filters
    {
        public string logic { get; set; }
        public DateTime? FromDate { get; set; }
        public DateTime? ToDate { get; set; }
        public List<Filter> filters { get; set; }

        public bool IsDailyHours { get; set; }
    }
Any help would be much appreciated.
Martin
Telerik team
 answered on 02 Feb 2022
0 answers
97 views

Hi

I have successfully used jQuery to get and use the Value from a Field embedded on the page's form ... this is triggered by an entry (Key 13) ... what I would like to do for a different page is wait for a Form Field to be in focus, then update the content of the Field then refresh the Page ... what I believe is going wrong with my attempt is I don't believe the dynamic page has been loaded before my script is attempting to change the value. The example I have basically fires once when the page supposedly finishes azar loading.

<pre hidden=""> <script> var xmlhttp = new XMLHttpRequest(); var apptype = "New Membership chatrandom Application"; xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { jQuery('#vfb-field-1916').focus(); jQuery('#vfb-field-1916').val(apptype); location.reload(true); }} </script>

</pre> [vfb id=42]

EdwardCandis
Top achievements
Rank 1
 updated question on 01 Feb 2022
5 answers
140 views

Hi,

How do you configure a kendo jquery line chart with remote data (json) to display multiple axis.

I have a Target series with Date and Value AND a Program seires with Date a Value and I want both of them to be display on the same chart.

I was not able to find this demo or help from stackoverflow.

regadrs

Kevin
Top achievements
Rank 1
Iron
 answered on 01 Feb 2022
1 answer
129 views

Hi,

I have a line chart to show two data series, I use two line types but the legend is not synced with the series dash type.


function GetSeries() {
		return [{
			name: chartTerms[68941],
			type: "line",
			dashType: "dot",
			field: "Benchmark",
			color: chartColors["LightPurple"],
			markers: {
				visible: false
			},
		},
		{
			name: chartTerms[7151],
			type: "line",
			field: "Result",
			color: chartColors["DarkPurple"],
			markers: {
				visible: false
			},
		}]
	}

what I see is:

The Benchmark legend is not correct, it should be "dot"

Any idea?

Georgi Denchev
Telerik team
 answered on 01 Feb 2022
1 answer
674 views
I have a databound event that is used on grid but also on a treelist (at first it was grid). Is there a way to determine the type of the e.sender?
Martin
Telerik team
 answered on 31 Jan 2022
1 answer
600 views

Which event can I hook into in order to run custom code before a KendoGrid FilterMenu opens every time?

There is an event that runs once before it opens (filterMenuInit) and an event that runs every time after the menu opens (filterMenuOpen), but I need the third kind, which runs every time before opening.

Nikolay
Telerik team
 answered on 31 Jan 2022
1 answer
180 views

 

Hi, I want to send data for json format. 

 

This is my data format.

data = {models: Array(1)}, type = "update....

I want to send data like this.


data = {foo: 'bar', locale: 'en', name: 'test', description: '1', ...}

 

This data is same as {models:Array(1)} 's array.

 

My code is here. I used parameterMap to data format for change.

                parameterMap: function (data, type) {
                     if (type === "update") {
                        debugger;
                        return kendo.stringify(data.models[0]);
                    }
                    return kendo.stringify(data);
                }


But when sending data, DataSource.transport.update send another data like this.

 


        var users = new kendo.data.DataSource({
            transport: {
                update: {
                    contentType: contentType,
                    url: function (options) {

                        return base_api_url_manage_users + "info/" + options.models[0].userId ;
                    },
                    type: "PUT",
                },


They send this format.

data = {models: Array(1)}, type = "update....

 

I want to send data form as Objcet, not as Object in Array. How can I change this data format???

Please help me.

 

Thank you.

Ianko
Telerik team
 answered on 31 Jan 2022
1 answer
320 views

I have been working on the FileManager control with Kendo using jQuery & it feels very slow in initial loading when the file count increases to 5000+. I tried searching for custom paging, lazy loading, etc. for FileManager but no help. Do anyone knows how to achieve it? Any help will be highly appreciated.

Thanks.

Martin
Telerik team
 answered on 31 Jan 2022
2 answers
1.0K+ views

Hello,

I'm experiencing the following error, when I try to use "fromFile" function to load the data for a spreadsheet component from an excel file:

"The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide."

The problem seems to be in the version of JSZip library, which the component uses. I manually changed the version of  "JSZip" script to 2.6 and it works fine, but I want to know how to do it using the latest version of the spreadsheet component and the latest version of "JSZip". I used the same file in the demo page in your site and it works fine there. The version of kendo is "2020.1.406".

Kezar
Top achievements
Rank 1
Iron
 answered on 28 Jan 2022
1 answer
178 views

How to How to use  it as Json data type or local databing in kendoPivotGridV2 datasource

Is there an example that you can refer to?

Angel Petrov
Telerik team
 answered on 28 Jan 2022
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
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
+? 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?