Telerik Forums
Kendo UI for jQuery Forum
6 answers
600 views

There is a graph in which the date and sent to different values, the values can be both positive and negative.
In advance it is not known what it is understandable, we must first of all to sort data, time-consuming
Is there any comprehensive solution to display the date at the bottom of the graphs (categoryAxis.categories)?

________________

 
Есть график, в который отправляются даты и различные значения, значения могут быть как отрицательные так и положительные.
Заранее это не известно, что бы это понятно , надо предварительно производить сортировку всех данных,  что трудоемко
Существует ли какое-нибудь универсальное решение выводить даты  внизу графиков(categoryAxis.categories), как для положительных так и для отрицательных значений?

 

Tsvetomir
Telerik team
 answered on 04 Nov 2019
1 answer
380 views

We use chunk upload of files to send large files asynchronously with multiple requests.

I want to add custom field to each request (for example File ID) using e.data property.

This custom field has one-to-one relation (file ID <-> file).

 

I found out property -> e.files is Array (A list of the files that will be uploaded).

It means that upload event be triggered for multiple files.

 

I can`t understand cases when this field may contain more than one record (for async mode, using chunks).

On the server side -> request contains such info as chunkIndex, fileName, totalFileSize....

It means: one request for one file.

 

My questions are:

1. When do the upload event may have files property with more than one record?

2. Сan I rely on the fact that "files.length = 1" for async mode using chunks.

3. Is there are any other options to add my custom field (belongs to file) to request?

 

I really hope for your help, thanks.

Veselin Tsvetanov
Telerik team
 answered on 04 Nov 2019
1 answer
4.3K+ views
Hello

I'm using kendoUI multiselect, but have some issues with the styling - The input field is smaller than the surrounding div causing it to look weird. Also the data-placeholder text is only shown partially until the first time the controle is clicked

I'm using FuelUx  2.3.0, Twitter Bootstrap 2.3.2, jQuery 1.10.2 and KendoUI v2013.2.716

Here is my source code using the MultiSelect:

01.<!DOCTYPE html>
02.<html lang="en" class="fuelux">
03.  <head>
04.    <meta charset="utf-8">
05.    <script src='http://localhost/shared/assets/js/jquery-1.10.2.min.js' type='text/javascript'></script>
06.    <link rel='stylesheet' type='text/css' href='http://localhost/shared/assets/css/smoothness/jquery-ui-1.8.17.custom.css'>
07.    <script src='http://localhost/shared/assets/js/jquery-ui-1.9.1.custom.min.js' type='text/javascript'></script>
08.    <link rel='stylesheet' type='text/css' href='http://localhost/shared/assets/css/KendoUI/kendo.common.min.css'>
09.    <link rel='stylesheet' type='text/css' href='http://localhost/shared/assets/css/KendoUI/kendo.default.min.css'>
10.    <script src='http://localhost/shared/assets/js/KendoUI/src/kendo.web.js' type='text/javascript'></script>
11.    <script src="http://localhost/shared/assets/js/loader.js"></script>
12.    <link href="http://localhost/shared/assets/css/fuelux.css" rel="stylesheet">
13.  </head>
14.  <body>
15.    <script type='text/javascript'>
16.      var gVars = {};
17.      gVars.conf = {foo:'bar'};
18.      gVars.mainEventModel = {foo:'bar'};
19.      $(function(){
20.        gVars.objDetailsPage = new gVars.detailsPage(gVars.mainEventModel,1);
21.        gVars.objDetailsPage.selectArea();
22.      });
23.    </script>
24. 
25.    <script type="text/x-kendo-template" id="selectAreaTemplate">
26.      <label class = "control-label" for="treatedArea">Treated area:</label>
27.      <div class = "controls">
28.        <input id="treatedArea" style="width:400px;height:50px;"
29.               data-role="multiselect"
30.               data-auto-bind="true"
31.               data-placeholder="Click to select ..."
32.               data-text-field="name"
33.               data-value-field="value"
34.               data-source="gVars.objDetailsPage.getEventParameterTypeDataSource(13)" />
35.      </div>
36.    </script>
37. 
38.    <script type='text/javascript'>
39.      gVars.detailsPage = function(mainEventModel,treatmentTypeId) {
40.        this.treatmentTypeId = treatmentTypeId;
41.        this.mainEventModel = mainEventModel;
42.        this.eventParameterTypes = {
43.          overallResult : 1,
44.          treatment : 8,
45.          treatedArea : 13
46.        };
47.      };
48. 
49.      gVars.detailsPage.prototype.getEventParameterTypeDataSource = function(eventParameterId) {
50.        var dataSrc = new kendo.data.DataSource({
51.          transport: {
52.            read: {
53.              url: gVars.conf.getParameterTypeData,
54.              dataType: "json",
55.              data : {
56.                eventParameterTypeId : eventParameterId
57.              }
58.            }
59.          }
60.        });
61.        return dataSrc;
62.      };
63. 
64.      gVars.detailsPage.prototype.selectArea = function(){
65.        var diversForm = new kendo.View('selectAreaTemplate');
68.        var html = diversForm.render();
69.        $('#TemplateArea').html(html);
70.
      };
79. 
80.    </script>
81.    <div id="TemplateArea"></div>
82.  </body>
83.</html>
And here is the generated Markup (taken from Firefox, firebug console)
01.<div>
02.  <label class="control-label" for="treatedArea">Treated area:</label>
03.  <div class="controls">
04.    <div class="k-widget k-multiselect k-header" style="width: 400px; height: 50px;">
05.      <div class="k-multiselect-wrap k-floatwrap">
06.        <ul id="treatedArea_taglist" class="k-reset" unselectable="on" role="listbox">
07.          <input class="k-input" style="width: 25px" accesskey="" role="listbox" aria-expanded="false" tabindex="0" aria-owns="treatedArea_taglist treatedArea_listbox" aria-disabled="false" aria-readonly="false" aria-busy="false">
08.          <span class="k-icon k-loading k-loading-hidden"></span>
09.      </div><input id="treatedArea" data-source="gVars.objDetailsPage.getEventParameterTypeDataSource(gVars.objDetailsPage.eventParameterTypes.treatedArea)" data-value-field="value" data-text-field="name" data-placeholder="Click to select ..." data-auto-bind="true" data-role="multiselect" style="width: 400px; height: 50px; display: none;" multiple="multiple" aria-disabled="false" aria-readonly="false">
10.      <option value="0">Boot top</option>
11.      <option value="1">Upper verticals</option>
12.      <option value="2">Lower verticals</option>
13.      <option value="3">Entire verticals</option>
14.      <option value="4">Flat bottom</option>
15.      <option value="5">Entire hull</option>
16.      </input>
17.      <span style="font-family: MS Shell Dlg; font-size: 13.3333px; font-stretch: normal; font-style:normal; font-weight: 400; letter-spacing: normal; text-transform: none; line-height: 16px; position: absolute; visibility: hidden;"></span>
18.    </div>
19.  </div>
20.</div>

Smita
Top achievements
Rank 1
 answered on 04 Nov 2019
1 answer
6.9K+ views

Hi there,

I have a multi select dropdown. I was able to get the selected items list - which has the list of id's. But I wanted to pull the list of selected items text, instead of id's? Can someone help me out please?

 

Ex: MULTISLECT Dropdown

    Id Value

  1    ABC

  2  XYZ

  3  IJK

If 1 and 2 are selected, I wanted the values [ABC, XYZ], instead of [1,2].

 

Appreciate your help.

 

Kind Regards

NeelimaN

Smita
Top achievements
Rank 1
 answered on 04 Nov 2019
2 answers
562 views
Hey!

I have a simple drop down list bound to a kendo.observable object, I'm having difficulty implementing a template for the drop down.

I've tried several methods found online but can't seem to get it to work

example of code structure:
http://jsfiddle.net/hLG98/24/
jan
Top achievements
Rank 1
 answered on 02 Nov 2019
1 answer
266 views

Hi,

I'd like to use the PivotGrid control in a scenario where there may be several layers of grouping in the Rows.  

At the moment on the demos page I can see that when you expand a group (eg "All Products"), the expanded items are not directly below the All Products heading but off to the right.  This very quickly eats up horizontal room.

Is it possible to instead nest the expanded items almost directly below the heading (maybe only slightly to the right), like you'd expect in a tree view?

I'm including a screenshot of what it looks like and what I'd like to be able to do.

Cheers,

Ilya

Tsvetomir
Telerik team
 answered on 01 Nov 2019
10 answers
2.9K+ views
I posted the following question on StackOverflow, but got no response.  

So I will try here:

I am attempting to use KendoUI Validator with an ASP.NET WebForms project. I have a simple page, that has a number of inputs, and of course ASP.NET adds some hidden form elements as well.

I have the following questions:

  1. Why does the KendoUI Validator not ignore hidden form fields, and how to I get it to?
  2. Why does KendoUI apply the rules to every input field, and how to do get it to ignore some fields. I want a declarative way to do this, not by adding all sorts of exceptions in my validation rule, as per the example in the KendoUI Validator API page.
  3. Shouldn't it be that if no rule is set as an attribute in the input element (eg; required) then no validation is applied?
Behavior I am getting:
  • With no validation specific attributes on the input element at all, the validation rules still get applied when I call .validate()
  • Hidden form elements are validated.
I am using the following kendo:

http://cdn.kendostatic.com/2013.2.716/js/jquery.min.js
http://cdn.kendostatic.com/2013.2.716/js/kendo.all.min.js
http://cdn.kendostatic.com/2013.2.716/styles/kendo.common.min.css
http://cdn.kendostatic.com/2013.2.716/styles/kendo.default.min.css

I have put together a fiddle that demonstrates this: 
http://jsfiddle.net/codeowl/B5ML4/3/

And here is the code, for those that don't have access to fiddle, I have the following markup:
<form action="/" id="testForm">
    <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
    <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
 
    <input type="text" id="testInput" value="">
    <a id="testValidate" href="javascript:;">Validate</a>
</form>

and the following script:
var validatable = $("#testForm").kendoValidator({
    rules: {
        testRule1: function (input) {
            // Only "Tom" will be a valid value for the FirstName input
            return input.is("[name=firstname]") && input.val() === "Tom";
        },
        testRule2: function (input) {
            return $.trim(input.val()) !== "";
        }
    },
    messages: {
        testRule1: "Your name must be Test",
        testRule2: "Your name must be Foo"
    }
}).data("kendoValidator");
 
$("#testValidate").click(function () {
    if (validatable.validate()) {
        alert('passed');
    }
});

and when I press the validate link it shows validation messages for the hidden fields.
Petar
Telerik team
 answered on 01 Nov 2019
3 answers
250 views

Mobile platform HTML editing using KendoEditor with Xamarin.Forms.Webview.EvaluateJavaScriptAsync() 


<!DOCTYPE html>
<html>
<head>
    <link href="kendo.common.min.css" rel="stylesheet">
    <link href="kendo.rtl.min.css" rel="stylesheet">
    <link href="kendo.default.min.css" rel="stylesheet">
    <link href="kendo.default.mobile.min.css" rel="stylesheet">
    <script src="jquery.min.js"></script>
    <script src="jszip.min.js"></script>
    <script src="kendo.all.min.js"></script>
    <script src="console.js"></script>
    <script>

    </script>

</head>
<body>
    <div id="example">
        <textarea id="editor">Default text to be replaced</textarea>


        <script>
            $("#editor").kendoEditor({
                tools: [
                    "bold",
                    "italic",
                    "underline"
                ],
                resizable: {
                    toolbar: true
                }
            });
        </script>
    </div>    
</body>
</html>


When injecting the above KendoEditor script into the Xamarin.Forms.Webview.EvaluateJavaScriptAsync() after replacing the “Default text..” with an HTML string containing embedded Base64 images,  I am finding that it takes a long period of time before the editor is rendered.  The HTML contains 3 images each around 3Mb in size.  Loading the same HTML containing base64 images in a web application using the KendoEditor is a lot quicker.  Has anyone else used the KendoEditor in this way on the mobile platform, and can give any insight as to why the rendering is taking so long?
Ivan Danchev
Telerik team
 answered on 01 Nov 2019
1 answer
117 views

Hi,

I've been researching the scheduler and can't seem to see if I can get the scheduler to format Data like the below

 

Person            Monday 25th     Tuesday 26th    Wednesday 27th    Thursday 28th  etc

Jamie

Chris

Fred

Steve

 

Basically I want day slots for each person that I can schedule tasks for. Only one box is required for the task (we can combine multiple tasks into one if necessary) However if its possible to add multiple tasks to the one box that is even better (for drag and dropping tasks between people / days)

Any assistance greatly appreciated or advice on another control that might be better suited.

 

Stefan

 

 

Ivan Danchev
Telerik team
 answered on 31 Oct 2019
2 answers
381 views

I have a grid that I want to populate from data returned from an ajax request.

The data is returned as part of the Ajax response, but is not displayed in the grid.

My code is:-

$.ajax({
               type: "POST",
               async: true,
               contentType: "application/json;charset=utf-8",
                url: "@Url.Content("~/Dynamic/CompareTables")",
               data:'{"tab1":"' + t1 + '","tab2":"' + t2 + '","link1":"' + l1 + '","link2":"' + l2 + '","CompDesc":"' + desc + '"}',
               dataType: "json",
               success: function (data) {
                   if (data.Success == true) {
                       alert(data.Message);
 
                      
                       //Create grid from data
 
                        var fMatches = new kendo.data.DataSource({ data: data.FieldMatches });
      
 
                        fMatches.read();
 
 
                       $("#fieldCompGrid").kendoGrid({
                       dataSource: {
                           data: fMatches,
                           schema: {
                               model: {
                                   fields: {
                                       FieldName: { type: "string" },
                                       FieldTypeMatch: { type: "boolean" },
                                       MatchFound: { type: "boolean" },
                                       MaxLengthMatch: { type: "boolean" },
                                       PrecisionMatch: { type: "boolean" },
                                       OutputHeader: { type: "string" },
                                       Output: { type: "string" },
                                        CanBeCompared: { type: "boolean" }
                                   }
                               }
                           },
                           pageSize: 20
                       },
                       height: 550,
                       scrollable: true,
                       sortable: true,
                       filterable: true,
                       pageable: {
                           input: true,
                           numeric: false
                       },
                       columns: [
                           "FieldName",
                           { field: "FieldTypeMatch", title: "Type Match" },
                           { field: "MaxLengthMatch", title: "Max Length Match", width: "130px" },
                           { field: "CanBeCompared",  title: "Can Be Compared" }
                       ]
                   });
             
 
 
 
 
                       //show div
                       $('#resultsDiv').show();
 
                        
                       //$("#Grid").data("kendoGrid").dataSource.read();
 
                       $('#compBtn').show();
                       $('#imgWait').hide();
 
                        
                        
 
                   }
                   else {
                         
                       $('#imgWait').hide();
                       alert(data.Error);
                      $('#compBtn').show();
 
                   }
 
 
               }
               ,
               error: function () {
                  $('#imgWait').hide();
                   alert("An error has occurred.");
                    $('#compBtn').show();
               }
           });

How can I get this working?

Thanks

AP
Top achievements
Rank 1
Iron
Iron
Veteran
 answered on 31 Oct 2019
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
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
ScrollView
Switch
TextArea
BulletChart
Licensing
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
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
SegmentedControl
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?