Telerik Forums
Kendo UI for jQuery Forum
1 answer
169 views

Hello All,

We've integrated Kendo Grid into our application and it works ok. But only until we lock any column in it - let's say we want first column to be always available while horizontal scrolling.
When the column is locked, grid's performance falls drastically. For instance, here is a statistic from profiler while doing columns reordering.

Some info about grid:

  • 21 columns
  • more than 100 rows
  • in-cell editing
  • vertical/horizontal scrolls
  • enabled columns reordering 

Thanks a lot beforehand

Petyo
Telerik team
 answered on 21 Sep 2015
1 answer
145 views

Hello,

thank you for implementing this useful functionality. I have a few of comments and suggestions to it.

1) Hiding scroll buttons

Currently, a scroll button is hidden every time there's no possibility to scroll any further in the respective direction. The problem is it's being hidden using style attribute instead of attaching CSS classes (k-disabled e.g.) which would be much more convenient in case you need to adjust design of it (without using !important directive).

2) Navigation is not automatically scrolled to the active tab after screen resolution / viewport is changed

I found a not perfect workaround using tabStrip.activateTab(tabStrip.select()) to achieve this, but automatic solution would be nicerII

 

I'm looking forward to your opinions.

Petyo
Telerik team
 answered on 21 Sep 2015
12 answers
352 views

As show in this demo. Seems sortable made inline editing input box of grid disabled(But click edit button).
I did some research. The walkaround is to get grid ignore input box.
I have setup currentGrid.table.kendoSortable({ignore: ".background-color-white, input"} which seems work.
Can anyone from Kendo team confirm this is the right way to ignore multiple class?

Peter
Top achievements
Rank 1
 answered on 21 Sep 2015
1 answer
80 views

I have a kendo grid defined as below:

$("#myGrid").kendoGrid({
    dataSource: {
        read: {
            url: "/getData",
            dataType: "json"
        },
        schema: {
            model: {
                id: "myId",
                fields: {
                    myId: {},
                    field1: {},
                    field2: {},
                }
            }
        }
    },
    columns: [{
        field: "field1",
        title: "Field 1"
    }, {
        field: "field2",
        title: "Field 2"
    }]
});

 

But on loading the page, no data read request is fired. Please advise what I did wrong here?

 

Thanks,

Yuan
Top achievements
Rank 1
 answered on 20 Sep 2015
8 answers
481 views
Hi,

I've successfully created a custom widget and can use it as the editor in a kendo grid but I can't figure out how to databind it.  I want the widget to have a value property that is bound to the datasource of the grid so that when the grid is loaded, this widget will be filled with the correct value for that record and when the value is changed in the widget it will update the value of the bound field in that record of the datasource.  Can you please let me know how to achieve this?  Is there a simple example?

Please help.

Thanks
Gal
Top achievements
Rank 2
 answered on 19 Sep 2015
9 answers
940 views
I have a grid bound to a dataSource. A change event on another control modifies the grid's selected data item and syncs the dataSource.

When the operation completes the selected row in the grid deselects.

This is not the behaviour I want - I want the grid row to remain selected. I cannot find anything to explain or modify the behaviour.

Several controls can modify the data, for instance:
$("#projectSponsor").kendoDropDownList({
                dataTextField: "name",
                dataValueField: "id",
                dataSource: projectSponsorDataSource,
                autoBind: true,
                change: projectUpdate
            });
The function that updates the data item and syncs the source is below:
function projectUpdate() {
    //Update the data item related to the selected projectsGrid row and call sync()
    var grid = $("#projectsGrid").data("kendoGrid");
    var dataItem = grid.dataItem(grid.select());
    dataItem.title = document.getElementById("projectTitle").value;
    dataItem.budget = $("#projectBudget").data("kendoNumericTextBox").value();
    dataItem.sponsor = $("#projectSponsor").data("kendoDropDownList").value();
    dataItem.manager = $("#projectManager").data("kendoDropDownList").value();
    dataItem.status = $("#projectStatus").data("kendoDropDownList").value();
    dataItem.phase = $("#projectPhase").data("kendoDropDownList").value();
    dataItem.chartCode = $("#projectCIPcode").data("kendoDropDownList").value();
    dataItem.startDate = $("#startDatePicker").data("kendoDatePicker").value();
    dataItem.endDate = $("#endDatePicker").data("kendoDatePicker").value();
    dataItem.dirty = true;
    grid.dataSource.sync();
}
This all works very well, except that after the sync() method on the dataSource the selected row in the table is deselected.
Douglas
Top achievements
Rank 1
 answered on 19 Sep 2015
6 answers
1.6K+ views
I've got a grid bound to a result set.  Two of the columns need to be percentage values, though they come in as decimals.  I can get them to format as percentages (data: .97, displayed: 97%) when just viewing with two different methods, but when I tab into the cell/column, the value goes back to decimals and I need the percentage/whole number to stay visible.  Any ideas?

I've omitted some columns to save reading:

$("#calcParameters").kendoGrid({
                 //dataSource: data.marketSectors,
                 selectable: "single",
                 editable:true,
                 resizable: true,
                 pageable: false,
                 sortable: true,
                 scrollable: true,
                 navigatable: true,
                 serverFiltering: true,
                 toolbar: [{name: "addNew", text: "Add Record", click: function(){alert('hi');}}, "cancel"],
                 columns: [
                           {field: "recordId", hidden:true},                          
                           {field: "premiumRetentionFactor", title: "Retention Factor", template: "<div> #= kendo.toString(premiumRetentionFactor, 'p0') #</div>" },
                           {field: "dividendRetentionFactor", format: "{0:p0}", title: "Return Factor", editor:percentEditor},
                           { command: ["destroy"], title: " ", width: 125}
                           ],
                 save: function(e) {
                               e.model.updated = true;
                       }
             });
Satish
Top achievements
Rank 1
 answered on 19 Sep 2015
1 answer
88 views

toolbar.enable works with buttons and splitButtons but not with menuButtons (subitms of splitButton)

See http://dojo.telerik.com/IpetA/2

Patrick | Technical Support Engineer, Senior
Telerik team
 answered on 18 Sep 2015
3 answers
609 views
I'm very clueless on this error. Here is my scenario, every time the user selects a value on the combobox, I needed to repopulate the treeview. The error is "setDataSource is not a function". 

//populate tree view base on the site selected
            var params = new Object();
            params.siteid = site.value();

            var jsondata = $.param(params);

            $.ajax({
                type: "GET",
                url: "/Maintenance/ProjectFolderListBySite",
                data: jsondata,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                success: function (result) {

                    var nodes = $.parseJSON(result.d);

                    var ds = new kendo.data.HierarchicalDataSource({
                        data: nodes,
                        schema: {
                            model:
                            {
                                id:"id",
                                parentid:"ParentID",
                                name:"Name",
                                siteid:"SiteID",
                                hasChildren:"hasChildren",
                                detailfolder:"DetailFolder"
                            }
                        }
                    });

                    $("#treeview").data("kendoTreeView").setDataSource(ds);

                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    alert(textStatus);
                }
            }); 
Sreejith
Top achievements
Rank 1
 answered on 18 Sep 2015
1 answer
145 views

Greetings,

I have a grid which displays a ClientDetailTemplateId for additional details that won't fit horizontally on the page. I'm trying to wire-up a Kendo chart into that template, but I am receiving "Invalid template" errors. I was hoping someone could help me fix this up.

 

The template looks something like this:

@using Inventory.Models.Reservation
 
<script id="​reservedAmountsTemplate" type="text/kendo-tmpl">
@(Html.Kendo().Chart<ReservedAmountsViewModel>()
    .Name("chart_#=ReservationId#")
    .Title(title => title
      .Text("​Title!")
      .Position(ChartTitlePosition.Bottom))
    .Series(series =>
    {
      series.Pie(new dynamic[]
      {
        new {category = "​Test1", value = 53.8},
        new {category = "​Test2", value = 16.1},
      });
    })
    )
</script>

The error is your standard "Unhandled exception at line 9, column 7418 in http://localhost:9244/Scripts/kendo/2015.2.805/kendo.all.min.js
0x800a139e - JavaScript runtime error: Invalid template".

Thanks in advance!

ImNotTed
Top achievements
Rank 1
Iron
 answered on 18 Sep 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?