Telerik Forums
Kendo UI for jQuery Forum
0 answers
143 views

I am facing two different problems when pressing  the export to PDF button external to the Kendo Grid (We are using : kendo.web.min v2015.2.624  and pako_deflate.min 2015.2.624 to enable compression in the PDF - we are using local data)

1- The time it takes to export data to PDF is almost 10 times the excel export for the same set of data.

2- Firefox is giving the warning dialog box (attached) that the script is unresponsive.

 

thanks

Brian
Top achievements
Rank 1
 asked on 24 Aug 2015
1 answer
68 views

Hello,
seems that if I have a resource with no records associated in datasource they are not displayed in the scheduler.

Am I right?

How can I solved it? I need them to be displayed.

 

 

Thanks in advance.

Georgi Krustev
Telerik team
 answered on 24 Aug 2015
1 answer
96 views

Hi, i can´t get this to work when I don´t use batch=true.

This works for batch creation (i copied it from one of your examples), please notice the marked as bold and italic code:

var dataSource = new kendo.data.DataSource({
  transport: {
    read: function(options) {
      /* implementation omitted for brevity */
    },
    create: function(options) {
      $.ajax({
        dataType: "jsonp", // "jsonp" is required for cross-domain requests; use "json" for same-domain requests
        // send the created data items as the "models" service parameter encoded in JSON
        data: {
          models: kendo.stringify(options.data.models)
        },
        success: function(result) {
          // result is an array containing the recently created item
          options.success(result);
        },
        error: function(result) {
          // notify the data source that the request failed
          options.error(result);
        }
      });
    }
  },
  batch: true,
  schema: {
    model: { id: "ProductID" }
  }

 

 I guess the only difference should be:

 

var dataSource = new kendo.data.DataSource({
  transport: {
    read: function(options) {
      /* implementation omitted for brevity */
    },
    create: function(options) {
      $.ajax({
        dataType: "jsonp", // "jsonp" is required for cross-domain requests; use "json" for same-domain requests
        // send the created data items as the "models" service parameter encoded in JSON
        data: {
//Send a single object array, the webservice is expecting an array of objects, i first coded it so it would work mainly with batch=true  
models: kendo.stringify([options.data])
        },
        success: function(result) {
          //result is an array of objects. contains  the recently created item
          options.success(result);
        },
        error: function(result) {
          // notify the data source that the request failed
          options.error(result);
        }
      });
    }
  },
  batch: false,
  schema: {
    model: { id: "ProductID" }
  }

 

I tried sending and receiving an object instead an array of objects, but it didnt work either...

Thanks a lot for your help.

 

Rosen
Telerik team
 answered on 24 Aug 2015
1 answer
1.5K+ views

Hey guys,

perhaps a simple question, but i'm a little bit confused about this... How can i bind a remote datasource to a simple form. I know already which ID i want to use, but i don't know how to get the one specific ID and bind the Field to an input. In this case i open my page "http://myurl/form.php?id=618" and would like to fill out the whole form.

Thanks,
Chris

 

<form id="myForm">
  <ul>
    <li>
      <input type="text" id="myField" class="k-textbox" data-bind="value:myField" />
    </li>
  </ul>
</form>
 
<script>
var dataSource = new kendo.data.DataSource({
    transport: {
        read: {
            url: "http://myURL",
            dataType: "json",
            type: "GET",
            contentType: "application/json"
        }
    },
    schema: {
        model: {
            id: "ID",
            fields: {
                ID: "ID",
                myField: "myField",
            }
        }
    }
});
</script>

Rosen
Telerik team
 answered on 24 Aug 2015
3 answers
133 views

Hello to all,

I can't find if is possible to create a new event in the scheduler via drag.

 

Thanks in advance.

Georgi Krustev
Telerik team
 answered on 24 Aug 2015
4 answers
271 views
Hello.
I'm using version 2015.2.805.
and I see this on all my grid.
if browser window width < 1025 paging in footer drops down
and I have troubles in many ui components.
what should I do? wait for the next version, or solve problems in your css file?
Plamen Lazarov
Telerik team
 answered on 24 Aug 2015
4 answers
169 views
Hi,
   I have a grid which is editable. On focus on the cell of the grid if the cell is editable it will show a textbox or a combobox . This works fine. I have put required field validator on the combobbox and that also works fine. That is if I press tab key on an empty combobox in the grid the message is displayed and the focus is set to the combobox itself. Now coming to my problem. If the combobox has invalid data I need to validate it using the kendo validator and custom validation. But I am unable to set the focus on to the combobox and hence the focus goes to the next cell and the message is also not displayed. Please help.
Thanks in advance.
Regards,
Vijay
Alexander Popov
Telerik team
 answered on 24 Aug 2015
3 answers
1.2K+ views

Hi,

 I have grid with more than 100 records. I want to edit a record. so I have used filter or manually went to that page (say 5th page) and clicked edit or view. My edit and view buttons are custom buttons where it takes to another page. when i click save or cancel on edit or view pages, it will navigate to page where i have grid. The grid is by default selecting the first record. But i want to retain the filter or page number where the record is and should go to that page automatically. If it is in first page i am doing it on data bind, manually selecting the record and it is working fine. If the record is in the 5th page or so , I am selecting the record but the grid is going to default to first page.

 

function grid_dataBinding(e) {
        
        var grid = this;
        var count = 0;
        var value = $("#myDiv").data('value');   
        if (value > 0) {
            $.each(grid.tbody.find('tr'), function () {
                var model = grid.dataItem(this);
                if (model.id == value) {//some condition
                    $('[data-uid=' + model.uid + ']').addClass('k-state-selected');
                    count++;
                    return;
                }
            });
        }
// If i dont have any selected id, I am defaulting it to first record
        else {
            this.element.find('tbody tr:first').addClass('k-state-selected');
        }
// If i dont find the selected id in the grid am defaulting it to first record
        if (count == 0)
            this.element.find('tbody tr:first').addClass('k-state-selected');
}

Alexander Popov
Telerik team
 answered on 24 Aug 2015
5 answers
1,000 views

Hi.

 I am trying to build a kendo grid with a custom editor. My grid has 2 checkboxes that have custom designs. I was able to create a template to handle the custom checkboxes. However, I am having difficulty with having that same custom design working in the edit mode. I have posted below my code which includes how I intended the custom checkboxes to be built: 

<div id="grid" class="settings-grid patient-settings"
               data-columns='[{title: "", width: "15px", attributes: {"class": "indent-cell"}},
               
               {field: "select", title: "select", width: "40px", template: "#if (select) { # <div class=\"checkbox\"><label class=\"check-label\"><input type=\"checkbox\" name=\"check\" class=\"check\" checked=\"true\" disabled=\"true\"/> <span></span></label></div> # } else { # <div class=\"checkbox\"><label class=\"check-label\"><input type=\"checkbox\" name=\"check\" class=\"check\"  disabled=\"true\"/> <span></span></label></div> # } #"}, 
                                         
               {field: "description", title: "Description", attributes: {"class": "desc"}},
                                         
               {field: "active", title: "Active", width: "63px",  template: "# if (active) { # <span class=\"icon_check\"></span> # } #"},
                                         
               {command: [ { name: "edit", text: {edit:"", update:"", cancel:""}}, {name: "destroy", text: "" }], title: "Actions", width: "15%"}]'>
 
 <script type="text/javascript">
var dataSource = new kendo.data.DataSource({
            data: [
                
                    id: 1,
                    select: 0, 
                    description: "Option text goes and so forth ...",
                    active: 0
                }, {
                    id: 2,
                    select: 1,
                    description: "Option text goes right here and so forth ...",
                    active: 1
                }, {
                    id: 3, 
                    select: 1,
                    description: "Option text goes right here ...",
                    active: 1
                }, {
                    id: 4,
                    select: 1,
                    description: "Option text goes here ...",
                    active: 1
                }
            ],
            pageSize: 7,
            schema: {
                model: {
                    id: "id",
                    fields: {
                        select: {
                            type: "boolean",
                            editable: true,
                            nullable: false
                        },
                        description: {
                            type: "string",
                            editable: true ,
                            nullable: false
                        },
                        active: {
                            type: "boolean",
                            editable: true ,
                            nullable: false
                        }
                    }
                }
            }
        });
     
    // Create an observable object.
    var vm = kendo.observable({
        settings: dataSource
    });
 
    kendo.bind($("#grid"), vm);
</script>

Kiril Nikolov
Telerik team
 answered on 24 Aug 2015
7 answers
2.1K+ views
I have an angular kendo grid of items (large number of rows and server paginated). I'd like to have an extra checkbox column that a user can check to selected each row in the table. I'd like the grid to remember selected row across page navigations.

I need to maintain an angular scope variable of selected items.

Very much like http://www.kendoui.com/code-library/web/grid/select-grid-rows-using-checkboxes-and-preserve-it-between-the-pages.aspx but with angular.

Is there an easy way around this ?
Kiril Nikolov
Telerik team
 answered on 24 Aug 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?