Telerik Forums
Kendo UI for jQuery Forum
1 answer
80 views

Hi, can I add a value in a middle of soughnut chart?

in general, how can I get the widget from your main page?

 

Danail Vasilev
Telerik team
 answered on 04 Feb 2016
2 answers
83 views

Hello,

 I met a situation that I should toggle the multiselect control's tag mode dynamically. when there are more than fixed amount items, use single mode, when less than the amount, then use multiple mode. 

According to this, I should use k-rebind to recreate the control while the tagMode changed. But the first time it always clear the selected items. I google it and somebody suggest to use k-ng-model, and k-value-primitive, but it also cannot work. here is the sample in dojo.

Does anyone know how to fix this?

Freddy
Top achievements
Rank 1
 answered on 04 Feb 2016
1 answer
605 views

Hello,

 I have this issue, I am trying to upload files via kendo upload and if the file format is .txt it is uploading the file properly. When I tried the same with .pdf, it always fails. I even tried all other file types like .doc, .xls, .csv etc. but they keep failing. I don't know what I am doing wrong. The following is my implementation of kendo Upload.

 HTML:  <input id="files" type="file" name="files" />

JQUERY: $("#files").kendoUpload(
        {
            multiple:true,
            //upload: onUpload,
            async: {
                saveUrl: "/Bank/Save",
                //removeUrl: "/Bank/Remove",
                autoUpload: true,
            }
        });

C#:  public ActionResult Save(IEnumerable<HttpPostedFileBase> files)
        {
             //The Name of the Upload component is "files"
            if (files != null)
            {
                foreach (var file in files)
                {
                    // Some browsers send file names with full path. This needs to be stripped.
                    var fileName = Path.GetFileName(file.FileName);
                    var physicalPath = Path.Combine(@"C:\New Folder\", fileName);  //Server.MapPath("~/App_Data")

                    // The files are not actually saved in this demo
                    file.SaveAs(physicalPath);
                }
            }

            // Return an empty string to signify success
            return Content("");
        }

        public ActionResult Remove(string[] files)
        {
            // The parameter of the Remove action must be called "fileNames"

            if (files != null)
            {
                foreach (var fullName in files)
                {
                    var fileName = Path.GetFileName(fullName);
                    var physicalPath = Path.Combine(@"C:\New Folder\", fileName);

                    // TODO: Verify user permissions

                    if (System.IO.File.Exists(physicalPath))
                    {
                        // The files are not actually removed in this demo
                        System.IO.File.Delete(physicalPath);
                    }
                }
            }

            // Return an empty string to signify success
            return Content("");
        }

 

Dimiter Madjarov
Telerik team
 answered on 04 Feb 2016
2 answers
135 views

Hi,

I created a Grid with a custom popup to edit my record I used the code below:

editable: {mode: 'popup',     template: kendo.template($("#myEdit").html())},

This works fine, but I also wanted to implement an area where I could display the errors that came from the server, so my popup was something like this

<script id="edit_admLicenca" type="text/x-kendo-template" ng-controller='mainController'>
      <div class="col-md-5 col-md-offset-3">
          <h3> Licença</h3>
           
          <div class="alert alert-danger">       
            {{errorHomeMsg}}
          </div>
           
          <div class="form-group">
            <label for="nomCliente">Nome:</label>
            <input type="text" class="form-control" name="nomCliente"/>
             
            <label for="datExpiracao">Nome:</label>
            <input type="date" class="form-control" name="datExpiracao"/>
        </div>
    </div>
</script>

But when I try to run it, it doesn't work, it displays the {{errorHomeMsg}} even though my update works correctly.Any thoughts?

 

Att

Matheus Mokwa

Nikolay Rusev
Telerik team
 answered on 04 Feb 2016
3 answers
403 views

I'm trying to set a splitter to 100% height, as per the example here: http://docs.telerik.com/KENDO-UI/controls/layout/splitter/how-to/expand-splitter-to-100-height

But I'm running into some very strange behaviour, as seen in this video (please ignore the styling, we're in the middle of a system update): http://recordit.co/kE4wBkI3k4

The video starts on a fresh load of the page. You can see the breadcrumbs, and what appear to be the splitter resize and collapse controls. The rest of the page is empty, even though there should be content. When I click the splitter resize, the content blinks in, and while the splitter is highlighted, it seems bent over/doubled up at the top. At 0:10 I refresh the page again, showing how a new page load is blank, except for the splitter controls. Collapsing the left panel causes the content to appear again. I was having a hard time grabbing the splitter to re-expand the left panel, so I refreshed again (0:23), and dragged it out again to test the resizing of the panels. You'll also notice that I have no scrollbars in the video, despite the fact that the content runs off the bottom of the page.

Here's my HTML:

<body
    <div id="jsParentContainer">
        <div id="splitter">
            <div id="tree_pane" class="pane-content">
                <div id="nav_tree">/div>                       
            </div>
            <div id="tab_pane" class="pane-content">
                <div id='jqxTabs'>
                    <iframe class="tab-iframe" id="start_iframe" src="" testStudioTag="" width="100%" frameborder="0" vspace="0" hspace="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>                      
                </div>
            </div>     
        </div>
    </div>
</body>

And the splitter init:

function createSplitter() {
    $('#splitter').kendoSplitter({
    orientation: "horizontal",
    panes: [
        {collapsible: true, size: "20%"},
        {collapsible: false, size: "80%"}
    ],
    messages: {   //TODO: add translations
        retry: '',
        requestFailed: '',
        loading: ''
    }
});  
}

And the CSS I added, as per the help:

<style>
    html, body { height:100%; margin:0; padding:0; overflow:hidden; }
         
    #jsParentContainer { height:100%; margin:0; padding:0; overflow:hidden;}
         
    #splitter { border-width: 0; height:100%; }
</style>

Ashleigh L
Top achievements
Rank 1
 answered on 03 Feb 2016
3 answers
326 views

Hi

 

I have a kendo grid with k-rtl class.

the grid has a horizon scroll, when i scroll to right or left it's work good but when the mouse is leave the grid zone

all the columns move to the left and there is a big white space in the grid or the scroll jump to other side.

 

you can see this dojo for example: http://dojo.telerik.com/Univi/4

 

thanks

Dimo
Telerik team
 answered on 03 Feb 2016
1 answer
163 views

Hello,

 

Will the TreeList support to binding to xml data? I try it, calling the data using XML but the result is: No records to display.

 

Here is the code

JAVASCRIPT

  

 

 

 

Alexander Popov
Telerik team
 answered on 03 Feb 2016
1 answer
253 views

The Gantt already has week and month.  I would like to add quarter.  

Running a copy and paste of this code doesn't provide a quarter view?  Any ideas?  

http://docs.telerik.com/KENDO-UI/controls/scheduling/gantt/how-to/creating-custom-view

Bozhidar
Telerik team
 answered on 03 Feb 2016
3 answers
99 views

Hello All !

First of all I want to say that you are doing a great job with Kendo ! It is a AWESOME framework.

BUT, before I buy a license, I need to know if I will be able to migrate my currently running app to kendo.

I must confess that I am not a javascript master, I am a OK developer, my focus was always PHP...

 

The part of my app that is giving me headaches is the javascript templates.

 

My app strongly rely on templates. Mostly to build complex html forms. Also, it is important to say, that my app uses the SINGLE PAGE structure, so, the javascript is loaded only once into the page.

 

Currently I use Boris Moore plugin, called jQuery tmpl. (https://github.com/BorisMoore/jquery-tmpl)

 

I will show you the logic I use in my app, so you can tell me if I can do the same with KendoUI templating engine.

 

First of all, I make a AJAX request to get from php a JSON structure of my form (for this example I will make it a JS array)

This is the object:

var form = [
    {
        method: "post",
        action: "save.php",
        id: "new_form",               
        title: "Add new invoice",
        sections: [
            {name: "Details",
             id : "Details",
             fields : [
                 {
                     name: "Client Name",
                     type: "Text"
                 },
                 {
                     name: "Client Address",
                     type: "Text"
                 },
                 {
                     name: "Client Sex",
                     type: "Radio",
                     options: [
                         {
                             name: "Male",
                             value: "1"
                         },
                         {
                             name: "Female",
                             value: "2"
                         }
                     ]
                 }
             ]
            }
        ]
    }
];

 

OK, now, this are the templates that are ALL defined in a javascript loaded once.

I am showing a basic example, made only for this post, I didnt even test it, in my app it is MUCH more complex

 

01.var form_wrapper = "<form> {{if method}} method='{{>method}}' {{/if}} {{if action}} action='{{>action}}' {{/if}} id='{{>id}}' <h3>{{>title}}</h3> {{for sections tmpl='#form_section'/}} </form>";
02.var form_section = "<h4 id='{{>id}}'>{{>name}}</h4> {{for fields tmpl='#form_field'/}} ";
03.var form_field_wrapper = "<div> {{for this tmpl = formInputTemplate( this.type ) /}} </div>";
04. 
05.var form_field_text = "<legend>{{>name}}</legend><input type='text' name='{{>name}}' >";
06.var form_field_radios = "<legend>{{>name}}</legend><input type='radio' name='{{>name}}' >";
07. 
08.$.templates("form_wrapper", form_wrapper);
09.$.templates("form_section", form_section);
10.$.templates("form_field_wrapper", form_field_wrapper);
11.$.templates("form_field_wrapper", form_field_text);
12.$.templates("form_field_wrapper", form_field_radios);
13. 
14.function formInputTemplate(input) {
15. 
16.    if (input.type === "1")
17.        var template = 'form_field_text';
18. 
19.    if (input.type === "2")
20.        var template = 'form_field_radios';
21. 
22.    return template;
23.}
24. 
25.$("#form").html(
26.    $.templates.form_wrapper.render(form)
27.);

The main part of the code is when, to determine the INPUT template, it will run a function that will return the tamplate name that must be used for that input based on its TYPE.

 My question: If you show me how this example would run with kendo template engine, I would be able to make my whole app run with it !!!

Thank you VERY MUCH !

 

 

Dimo
Telerik team
 answered on 03 Feb 2016
2 answers
203 views

Hi all, 

I am using the Kendo UI Window now, for the resize function, can I just resize the window in a special direction? 

For example, I just want the window can resize east or south so that the window's location not change. 

I find there is a resizingDirection property on the. I try to judge it on the Window's resize event, but it not work.

Nick
Top achievements
Rank 1
 answered on 03 Feb 2016
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
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
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?