Telerik Forums
Kendo UI for jQuery Forum
1 answer
94 views

Greetings,

In the grid, I need to override the columns' draw (or render) functionality, so that I may render a custom "kendo.dropdownlist" for the column, and fill it appropriately.

 I see that there is an "editor" which can be used, but I need to create and fill the widget prior to this event firing.

 Where is the best place to accomplish such?  Sample snippet also much appreciated.

 Many thanks...

Konstantin Dikov
Telerik team
 answered on 01 Dec 2015
3 answers
138 views

I need to set useNativeScrolling = true on a particular view (for Android only) and can't seem to figure it out. I assumed it would be as easy as:

if (device.platform === "iOS")
//        {
console.log("ios");
    app.view().useNativeScrolling = false;
}

But that doesn't seem to do anything. I'm sure it's simple.

Petyo
Telerik team
 answered on 01 Dec 2015
1 answer
644 views
I am trying to export multiple data sources into one excel file, each data source has their own sheet in the excel.
I notice that If I move the following code out from the datasource.fetch() cluster, no data from the data source will be inserted.

        var workbook =new kendo.ooxml.Workbook( {
          sheets: [
            {
              columns: [
                // Column settings (width)
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true }
              ],
              // Title of the sheet
              title: "Orders",
              // Rows of the sheet
              rows: rows
            },
            {
              columns: [
                // Column settings (width)
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true }
              ],
              // Title of the sheet
              title: "Orders2",
              // Rows of the sheet
              rows: rows
            }
          ]
        });
    
    //save the file as Excel file with extension xlsx
    kendo.saveAs({dataURI: workbook.toDataURL(), fileName: "Test.xlsx"});

The problem is datasource.fetch() are skipped or temporary ignored, the above code will be executed before datasource.fetch() are execute.
To overcome that problem, I have to put a timeout function() at the  setTimeout(function(){kendo.saveAs({dataURI: workbook.toDataURL(), fileName: "Test.xlsx"});},20000);. By doing this way, the exported excel file will contain data from the data source which I find it is not a very appropriate way of doing it. 

Here is the snippets code of that I used from the sample provided by telerik with some code modification.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Kendo UI Snippet</title>

    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.common.min.css">
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.rtl.min.css">
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.default.min.css">
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.dataviz.min.css">
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.dataviz.default.min.css">
    <link rel="stylesheet" href="http://kendo.cdn.telerik.com/2015.3.1111/styles/kendo.mobile.all.min.css">

    <script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
    <script src="http://kendo.cdn.telerik.com/2015.3.1111/js/jszip.min.js"></script>
    <script src="http://kendo.cdn.telerik.com/2015.3.1111/js/kendo.all.min.js"></script>
</script>
</head>
<body>

    <script>
      var ds = new kendo.data.DataSource({
        type: "odata",
        transport: {
          read: "http://demos.telerik.com/kendo-ui/service/Northwind.svc/Orders"
        },
        schema: {
          model: {
            fields: {
              OrderID: { type: "number" },
              Freight: { type: "number" },
              ShipName: { type: "string" },
              OrderDate: { type: "date" },
              ShipCity: { type: "string" }
            }
          }
        }
      });

      var rows = [{
        cells: [
           // First cell
          { value: "OrderID" },
           // Second cell
          { value: "Freight" },
          // Third cell
          { value: "ShipName" },
          // Fourth cell
          { value: "OrderDate" },
          // Fifth cell
          { value: "ShipCity" }
        ]
      }];

      //using fetch, so we can process the data when the request is successfully completed
      ds.fetch(function(){
        var data = this.data();
        for (var i = 0; i < data.length; i++){
          //push single row for every record
          rows.push({
            cells: [
              { value: data[i].OrderID },
              { value: data[i].Freight },
              { value: data[i].ShipName },
              { value: data[i].OrderDate },
              { value: data[i].ShipCity }
            ]
          }) 
        }
      });

      var workbook =new kendo.ooxml.Workbook( {
          sheets: [
            {
              columns: [
                // Column settings (width)
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true }
              ],
              // Title of the sheet
              title: "Orders",
              // Rows of the sheet
              rows: rows
            },
            {
              columns: [
                // Column settings (width)
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true },
                { autoWidth: true }
              ],
              // Title of the sheet
              title: "Orders2",
              // Rows of the sheet
              rows: rows
            }
          ]
        });

        //save the file as Excel file with extension xlsx
      setTimeout(function(){kendo.saveAs({dataURI: workbook.toDataURL(), fileName: "Test.xlsx"});},20000);
    </script>
</body>
</html>

Currently I am showing the code exporting the same data source into different sheet in the excel file, just to keep the code short. Or you can access it from here,http://dojo.telerik.com/Otahe/3
It will be much appreciated if there is a better solutions to do this. 
Daniel
Telerik team
 answered on 01 Dec 2015
4 answers
466 views

I am trying to read json data from a remote service and its not working.

my code: 

 

var schema = {
                    data: "data",
                    model: {}
                };
var warmup = new kendo.data.DataSource({
                    schema: schema,
                    transport: {
                        read:  function(options) {
                                $.ajax( {
                                    url: kendo.toString(baseUrl + wkdayID),
                                    success: function(result) {
                                        console.log(kendo.toString(baseUrl + wkdayId));
                                        options.success(result);
                                    }
                                });
                            }
                    },
                    filter: { field: "IS_WARMUP", operator: "eq", value: "1" },
                    error: function() {
                        console.log(arguments); }
                });
 
                warmup.fetch();

 

 

however when I modify the url portion to a string and add it to the baseUrl  like this: 

url: kendo.toString(baseUrl + "21")

it works for some reason. does anyone know whats going on? I would like to be able to set that "21" dynamically. 

Kiril Nikolov
Telerik team
 answered on 01 Dec 2015
2 answers
559 views

Hello,

Im trying to create a way to filter the set of available checkboxes in my filter menu. I have created a dropdown list which specifies the operator and a input field which allows the user to enter a value. The filtering part works however I would like to provide a way to filter the checkboxes when the user presses enter in the input field.

The keyup event on the input field seems to close the filter menu automatically. I have tried to search in the kend.ui.filtermenu.fn._keydown events but no luck there.

You can see the behaviour in: http://dojo.telerik.com/IPAgo

Is there a way I could overwrite the keyup event and prevent the filter menu from closing?

It seems like its bind to the k-textbox class because if i remove the class from the textbox it's working as intended.

Thanks in advance!

 

 

 

Daniel
Telerik team
 answered on 01 Dec 2015
1 answer
143 views

I am using TypeScript 1.6 and the compiler is complaining that TreeListOptions.columns.editor cannot be set because the TreeListOptions is not expecting the 'editor' property.  When I check the kendo.all.d.ts file, this is what I see:

 interface TreeListOptions {
        name?: string;
        autoBind?: boolean;
        columns?: TreeListColumn[];
        ...
    }

...

interface TreeListColumn {
        attributes?: any;
        command?: TreeListColumnCommandItem[];
        encoded?: boolean;
        expandable?: boolean;
        field?: string;
        filterable?: TreeListColumnFilterable;
        footerTemplate?: any;
        format?: string;
        headerAttributes?: any;
        headerTemplate?: any;
        minScreenWidth?: number;
        sortable?: TreeListColumnSortable;
        template?: any;
        title?: string;
        width?: any;
        hidden?: boolean;
        menu?: boolean;
        locked?: boolean;
        lockable?: boolean;
    }

I am using version 2015.2.805, but I verified that this problem exists in the latest version 2015.3.1111 as well. 

Michelle

Nikolay Rusev
Telerik team
 answered on 01 Dec 2015
1 answer
144 views

I don't want to hide my submit button when my upload fails, im aware there is a retry button, but as my submit button has internacionalization text logic, it will much easy if the submit button just don't disapear.

I already know how to hide the retry button, i just need to keep the submit button there. In addition i will have to make the submit disapear on success.

Very tnks.

Alec Ventura.

Dimiter Madjarov
Telerik team
 answered on 01 Dec 2015
1 answer
94 views

Hello,

 

I used the following snippet:

 

http://dojo.telerik.com/AnEqA/2

 Jun 2015 and Okt 2015 are ok fine because they don't contain stacked values. But I would expect Aug 2015 to display 50 € für Sales and 50 € for Rent.

 How can I archive this? I tried to group the datasource but that didn't work out.

 

 

Regards

Iliana Dyankova
Telerik team
 answered on 01 Dec 2015
2 answers
1.2K+ views

Hello ,

I`m trying to create a simple contact form with Kendo validation. Everything works fine ,but if i want to use Kendo default styles , controls have unexpected behavior. You can see demo here: http://dojo.telerik.com/OHiDo/2 , can`t click on chechbox when it has class : k-checkbox and label has class : k-checkbox-label

If remove these styles , everything works fine .. Can you help me with these issue ? I want to use Kendo styles with Kendo validation.

Thanks.

Regards,
Harry.

Harry
Top achievements
Rank 1
 answered on 01 Dec 2015
1 answer
148 views

We lost a lot of time trying to use the notification widget by following that code sample: 
http://docs.telerik.com/kendo-ui/api/javascript/ui/notification#methods-show

But it's not working.
That configuration:  
{templates: { myAlert: "<div>System alert: #= myMessage #</div>"}}

should be: 
{templates: [
   { type: "myAlert", template: "<div>System alert: #= myMessage #</div>"}
]
}

The "open in dojo" link should display something like that: 
http://dojo.telerik.com/ufumo
Plamen
Telerik team
 answered on 01 Dec 2015
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
Licensing
ScrollView
Switch
TextArea
BulletChart
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?