Telerik Forums
Kendo UI for jQuery Forum
5 answers
246 views
var x = new kendo.data.DataSource({
    data: [],
    group: {
        field: "boo", aggregates: [
            { field: "foo", aggregate: "sum" }
        ]
    }
});

The above TypeScript code causes a compilation error with TypeScript definition of KendoUI (http://www.telerik.com/forums/q1'14-release---missing-typescript-definitions-70584e6883b0 ).  Here is the error message:

Supplied parameters do not match any signature of call target:
Types of property 'group' of types '{ data: any[]; group: { field: string; aggregates: { field: string; aggregate: string; }[]; [n: number]: kendo.data.DataSourceGroupItem; }; }' and 'kendo.data.DataSourceOptions' are incompatible:
Type '{ field: string; aggregates: { field: string; aggregate: string; }[]; [n: number]: kendo.data.DataSourceGroupItem; }' is missing property 'concat' from type 'kendo.data.DataSourceGroupItem[]'.
Vladimir Iliev
Telerik team
 answered on 21 Jul 2015
3 answers
82 views

I noticed that template-based Views are not destroyed as Router is navigating through them - they are simply taken out of the DOM. Sometimes this might be desired behavior, but not always. What is the recommended approach for destroying views, when Router is navigation out of them? This also would require complete disconnect from any subscriptions to ViewModel if they are kept in memory.

 Thanks,

 Sam

Petyo
Telerik team
 answered on 21 Jul 2015
3 answers
1.2K+ views

We are using a kendo ui grid to display some data and have had some issues with datasets over 1000 rows.  I built a web service and enabled server side paging which improved the initial load time.  But, now the grid is very sluggish when grouping, so I am attempting to enable server side grouping.  In addition, I am looking at sorting and filtering on the server in an attempt to improve performance.

What I am struggling with is determining what is being passed to the WCF service from the kendo ui grid for grouping, sorting, and filtering.

So far we have a method prototype of public RetObj GetData(int skip, int take, int page, int pageSize).

I know I will have to add parameters to handle the grouping, sorting, and filtering, but how do I determine what parameters to add?


Marin
Telerik team
 answered on 21 Jul 2015
3 answers
119 views

Hi, I tried to get a modal window to center and its not having any effect.

I can move the window around with the position attributes, and by putting the window div in different places in the DOM..

The center() function does not throw any exceptions.

The problem exists in both Chrome and IE11.

My page does not contain any Iframes. Any advice?

Summit Insights
Top achievements
Rank 1
 answered on 21 Jul 2015
2 answers
125 views

Whenever I add a k-error-template to my validator form element, all kendo datetimepickers are gone and replaced by a plain input box.

Here's an example of the behavior I'm seeing:

http://dojo.telerik.com/ipupO/2​

Patrick
Top achievements
Rank 1
 answered on 20 Jul 2015
2 answers
255 views

I want to add KendoEditor to my popup of custom-edit of 1 column field inside my kendo grid. I could add textarea successfully but don't know how to add kendoEditor to replace textarea.

{ field: "Description", title: "Description", id:"desc", attributes: { style: "text-align:left" }, editor: textareaEditorB }, 

function textareaEditorB(container, options) {
    $('<textarea data-bind="value: ' + options.field + '" cols="100" rows="18" maxlength="10000"></textarea>').appendTo(container);
    // $('$("#desc").kendoEditor()').appendTo(container); <==?????
}

Bertha
Top achievements
Rank 1
 answered on 20 Jul 2015
5 answers
5.7K+ views

I have a checkbox on each row of the grid on which if selected trying to get the id of that row. I have been using grid.dataItem($(event.target).closest("tr")) which was working perfectly fine and suddenly it stopped working giving null exception. I am using in lot of places event.target for the grid all are having the same problem. Did i accidentally delete any reference or you guys changed anything?

 

$("#gridProvidersWindow").on("click", ".checkbox", function (e) {
    var checked = $(this).is(":checked");
    var grid = $("#gridProvidersWindow").data("kendoGrid");
    var model = grid.dataItem($(event.target).closest("tr"));     
    checkedProviderIds[model.Id] = checked;
});

Daniel
Telerik team
 answered on 20 Jul 2015
6 answers
577 views
when we apply filter to any of the grid column, the add record button is not working?

please advice.
Greg
Top achievements
Rank 1
 answered on 20 Jul 2015
13 answers
3.2K+ views
Hello,

I have a treeview which has multiple levels and so we load only root nodes when treeview is displayed and everytime a node is expanded we query database and load its children. When the treeview is loaded sometimes i have a child node id and when treeview laods if a node id is passed then we should select the node by default and expand all its parent nodes. So my problem is when mytreeview loads i have only root nodes loaded adn no children and so if i look for id i do not find the node to expand. So my question is how do we load on demand when a child node id is provided which could be from nth level from any parent node whcih are not yet loaded.

thanks

Anamika
Daniel
Telerik team
 answered on 20 Jul 2015
2 answers
783 views

how can we map the sorting,paging and Filtering array to web API .

kendo datasource is as below : 

var data = new kendo.data.DataSource({

            type: "json",
            transport: {
                read: function (e) {
               
                    $http({
                        method: 'POST',
                        url: $scope.kendoGridConfig.URL,
                        dataType: "json",
                 
                        headers: { 'Content-Type': "application/json" },
                 
                        data: e.data
                     
                    }).
                    success(function (data, status, headers, config) {
                        e.success(data)
                    }).
                    error(function (data, status, headers, config) {

                        console.log(status);
                    });
                },

 

 Web API POST method

  public HttpResponseMessage AllCountries([FromBody]KendoGridOptions KendoGridOptions)

        {


            var res = _countryMasterService.GetListAllKendo(KendoGridOptions);
            return new HttpResponseMessage()
            {
                Content = new ObjectContent<KendoGridResults<CountryMasterView>>(res, new System.Net.Http.Formatting.JsonMediaTypeFormatter())
            };

        }

 

 

  public class KendoGridOptions
    {
        //public KendoGridOptions()
        //{
        //    this.sort = new List<GridSort>();
        //}
        public int Take { get; set; }
        public int Skip { get; set; }
        public int page { get; set; }
        List<GridSort> sort { get; set; }
        public int pageSize { get; set; }
    }


    public class GridFilter
    {
        public string Operator { get; set; }
        public string Field { get; set; }
        public string Value { get; set; }
    }

    public class GridFilters
    {
        public List<GridFilter> Filters { get; set; }
        public string Logic { get; set; }
    }

    public class GridSort
    {
        public string field { get; set; }
        public string dir { get; set; }
    }

Alexander Popov
Telerik team
 answered on 20 Jul 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?