Telerik Forums
Kendo UI for jQuery Forum
1 answer
368 views
Hi Team,

I want to disable tool-tip only when the grid column is in edit mode. 
Please help me out.

Regards,
Siva
Iliana Dyankova
Telerik team
 answered on 20 Jun 2014
1 answer
166 views
Hello

I want to export chart  as  PDF  , JPEG format . There is any way , Export chart as PDF using JS/HTML5 framework 
I don't want use any other language like Dot Net ,PHP , JSP ....etc . 
Please help me out ..

Thank you 
T. Tsonev
Telerik team
 answered on 20 Jun 2014
4 answers
456 views
I am trying to add a confirmation dialog to an upload, can make it work using the standard confirm function but would like to use a custom dialog instead.

Markup below correctly displays the dialog but can't work out where to place e.preventDefault() to stop the upload or how to allow upload if user clicks OK.

$(document).ready(function () {
 
      $("#attachments").kendoUpload({
          async: {
              saveUrl: '@Url.Action("SaveAppointments", "Upload")',
              autoUpload: false,
          },
          upload: onUpload,
          select: onSelect,
          success: onSuccess
      });
  });
 
  function onUpload(e) {
            //Standard confirm works fine but would like to use a dialog
              //so style can be applied etc
               
      //if (!confirm("Is this upload for the correct candidate?")) {
      //    e.preventDefault();
      //    return;
      //}
 
       
      //Dialog shows correctly but how do I stop
      //the upload if the user clicks no
      var kendoWindow = $("<div />").kendoWindow({
          title: "Confirm",
          resizable: false,
          modal: true
      });
 
      kendoWindow.data("kendoWindow")
      .content($("#upload-confirmation").html())
      .center().open();
 
      kendoWindow
      .find(".upload-confirm,.upload-cancel")
          .click(function () {
              if ($(this).hasClass("upload-confirm")) {
                  alert("Upload file...");
              }
              
              kendoWindow.data("kendoWindow").close();
          })
          .end()
 
 
      var files = e.files;
      $.each(files, function () {
          var ext = ".bmp .doc .docx .xls .xlsx .pdf .txt .jpg .jpeg .gif .zip .mp3 .wav .wmv .png .zipx .rar";
          if (ext.indexOf(this.extension) < 0) {
              alert("Incorrect file type, accepted file types are: .bmp, .doc, .docx, .xls, .xlsx, .pdf, .txt, .jpg, .jpeg, .gif, .zip, .zipx, .rar, .mp3, .wav, .wmv and .png")
              e.preventDefault();
          };
 
          if (this.size > 10485760) {
              alert("File too large, maximun upload size is 10mb")
              e.preventDefault();
          };
 
          if ($("#fileDescription").val() + '' == 'undefined') {
              alert("A file description is required.")
              e.preventDefault();
          };
 
          e.data = { fileDescription: $("#fileDescription").val(), appointmentid: $("#appointmentid").val() };
      });
 
       
  }

T. Tsonev
Telerik team
 answered on 20 Jun 2014
1 answer
775 views
HI Sir,

Good day.

Just would like to ask on how and where event to add confirm dialog before clicking the upload button  and how to add upload complete message or 100% complete once the upload is completed in kendo upload.

Here's my code below:


$(document).ready(function () {

        var lookup = $("#ComboLookupTable").data("kendoComboBox");
        $("#files").kendoUpload({
            async: {
                saveUrl: "Lookup/UploadFile",
                autoUpload: false,
                value: 'Import'
            },
            localization: {
                select: "Select a file",
                uploadSelectedFiles: "Import",
                headerStatusUploaded: "File validation",
                headerStatusUploading: "File uploading...",
                statusFailed: "Uploading file failed",
                statusUploaded: "File validating...",
                statusUploading: "Uploading..."
            },
            multiple: false,
            select: function (e) {
                confirmUpload();
               
            },
            upload: function (e) {
                lookup.enable(false);
                this.element.prop("disabled", true);
                this.element.closest(".k-button").addClass("k-state-disabled");
                 e.data = { selectedTable: $("#ComboLookupTable").val() };
            },
            success: function (e) {
                //debugger;
                resetUpload();
                if (e.XMLHttpRequest.responseText != '' && e.response != 'gridESREF' && e.response != 'gridFuelEfficiency' && e.response != 'gridConversionFactor' &&
                    e.response != 'gridGlobalEmissionFactor' && e.response != 'gridElectricalRegionalEmissionnFactor' && e.response != 'gridGWP') {
                    showErrorMsgsJson(e.XMLHttpRequest.responseText, 'windowDialog');
                    e.preventDefault();
                    dialog.close();
                }
                else {
                    var delay = 1500;
                    setTimeout(function () {
                        //grid names;
                        //gridRefresh(e.response);
                        dialog.close();
                    }, delay);
                }
            },
            complete: function (e) {
                resetUpload();
                this.element.prop("disabled", false);
                this.element.closest(".k-button").removeClass("k-state-disabled");
                lookup.enable(true);
            },
            error: function (e) {
                resetUpload();
                if (e.XMLHttpRequest.responseText != '') {
                    showErrorMsgsJson(e.XMLHttpRequest.responseText, 'windowDialog');
                    e.preventDefault();
                    dialog.close();
                }
            }

        });
    });

    function ConfirmCancel() {
        var kendoWindow = $("<div />").kendoWindow({
            title: "Upload",
            height: 130,
            width: 280,
            resizable: false,
            modal: true,
            animation: {
                open: {
                    effects: "fade:in",
                    duration: 500
                },
                close: {
                    effects: "slide:right fadeOut",
                    duration: 500
                }
            },
            visible: false
        });

        kendoWindow.data("kendoWindow")
            .content($("#cancel-upload").html())
            .center().open();

        kendoWindow
            .find(".delete-confirm,.delete-cancel")
                .click(function () {
                    if ($(this).hasClass("delete-cancel")) {
                        //If no
                        kendoWindow.data("kendoWindow").close();
                    }
                    else {
                        //If yes
                        resetUpload();
                        kendoWindow.data("kendoWindow").close();
                        dialog.close();
                    }
                })
    }

On my work, the confirm dialog is attached to Select event which is not a proper way.
Thank you in advance.
T. Tsonev
Telerik team
 answered on 20 Jun 2014
3 answers
295 views
Hi,

Is there a way to have different arrow colors for popover on the same page? I have the folowing code, which opens a red and a green popover:

http://jsbin.com/xopanitu/1/edit

As you see the red one (#popover1) is ok, but the green one (#popover2) is not, because it has a red arrow.

I can set the color of the arrow with the .km-popup-arrow:after css selector, but it is applied for all the popover arrows. How can I set to only apply it for #popover1 or only to #popover2? As I see the the structure of the popover is something like this:

<div data-role="popup">
           <div class="km-popup-arrow"></div>
           <div data-role="popover" id="popover1"></div>
</div>

The problem is that I can't get .km-popover-arrow div from #popover1 div with css selectors (there is no parent selector, and sibling selectors are also not working because the arrow preceeds the popover). 

As I see the only solution is to add an ID or class to the div with data-role="popup", but how? From the docs (http://docs.telerik.com/kendo-ui/api/mobile/popover#configuration-popup) there are only height, width, direction parameters for popop. Is there a way to add class or generate id for the popup div?

Thank you!
Kiril Nikolov
Telerik team
 answered on 20 Jun 2014
1 answer
79 views
Hello,
On login page as shown below, if there are any errors from the service call, I return to the same page and display errors. 
It works as expected, but the header part is gone missing when the login page is re-displayed with errors.
Using app.navigate to change the display based on success/failure scenarios.

Thanks for  your time and help.

--
Hiren





<!DOCTYPE html>

<html>
<head>
<title>My App</title>
<link href="../resources/css/kendo.mobile.all.min.css" rel="stylesheet" />
<script src="../resources/js/jquery.min.js"></script>
<script src="../resources/js/kendo.all.min.js"></script>
</head>

<body>
<div id="home" data-role="view" data-layout="default">
<h4>Sign in</h4>
<p>Username or email</p>
<p><input id="username" type="text" /></p>
<p>Password</p>
<p><input id="password" type="password" /></p>
<p/>
  <a href="kendoUI.html">Forgot your username or password</a>  
  <p/>  
<a data-role="button" data-click="login">Login</a>
 
<div id="errors"></div>
</div>
<section data-role="layout" data-id="default">
<header data-role="header">
<div data-role="navbar">My App</div>
</header>
<footer data-role="footer">
<div data-role="tabstrip">
<a href="#home">Continue As Guest</a>
</div>
</footer>
</section>


<script>
var app = new kendo.mobile.Application(document.body, 
   {
       transition:'slide'
   });

 
function login(){
var username = $("#username").val();
var password = $("#password").val();
  
var dataSource = new kendo.data.DataSource({
 transport: {
 read: {
          
           url: "http://localhost:8080/MyApp/rest/SecurityService",

           type: "POST",
           
           dataType: "json",

           data: { username: username, password : password }
}
 },
 requestEnd: function(e) {
 console.log("requestEnd");
// console.log(e);
   var response = e.response;
   console.log(response);
   
  var type = e.type;
  if (type === "read"){
  console.log("USERID : "+response.userId);
  app.navigate("homepanel.html");
  }else {
  console.log("error");
  $("#errors").html("User Not Found");
    app.navigate("#home");
  }
 
 }
});
dataSource.read();
 
}
 
    </script>
</body>
</html>
Petyo
Telerik team
 answered on 20 Jun 2014
1 answer
45 views
I just want to say thank you for reworking the Kendo UI documentation site. I really appreciate it - especially the performance boost.

Thanks
Holger
Kiril Nikolov
Telerik team
 answered on 20 Jun 2014
1 answer
152 views
I need show this format: 12.123,33 € for use it in Spain.
Change period (dot) for thousands and comma for decimals.

In my code I have:
<script type="text/javascript" src="js/kendo.culture.es-ES.js"></script>

The value of the decimal column (MySQL database) is: 12123.33
I tried with this code:
a)
$("#importe_oferta").kendoNumericTextBox({
culture: "es-ES"
format: "c2",
min: 0,
decimals: 2,
spinners: false
});
Result: 1.212.33.00 € ->wrong

b)
$("#importe_oferta").kendoNumericTextBox({
format: "c2",
min: 0,
decimals: 2,
spinners: false
)};
Result: $12,123.33 ->wrong

c)
$("#importe_oferta").kendoNumericTextBox({
min: 0,
decimals: 2,
spinners: false
 });
Result: 1,2123.43 ->wrong

And the same problem on the grid : 12,123.43 <-wrong

If anybody have the solution of this problem, please write a possible solution.
Thanks
Julio
Holger
Top achievements
Rank 1
 answered on 20 Jun 2014
1 answer
450 views
Hi.
I want to have the slider selection (just the visual marker) to start from the right side/ the max value, instead of the left.
I tried the RTL mode + swap the min/max values but this does not solve the problem.
Is it possible to do that?
Thanks.
Hristo Germanov
Telerik team
 answered on 20 Jun 2014
1 answer
160 views
I'm having problems with a template rendering when it includes the # character in it. All other special characters seem to work without a problem.except for the numerical sign.

http://jsbin.com/enutew/61/edit

This fails to render:
    <script id="tmp" type="text/x-kendo-template">
          <div>
               <label>#Value:</label>
                <label data-bind="text:attribute"></label>
           </div>
    </script>

While this renders fine:

    <script id="tmp" type="text/x-kendo-template">
          <div>
               <label>Value:</label>
                <label data-bind="text:attribute"></label>
           </div>
    </script>


Thanks!






Alexander Valchev
Telerik team
 answered on 20 Jun 2014
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
Bronze
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
Bronze
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?