Telerik Forums
Kendo UI for jQuery Forum
0 answers
180 views

Hello,

I tried to achieve Server-side grouping function with Kendo UI grid. The grid is grouping by two groups. Below is the grid configuration:

$("#gridTableNew").kendoGrid({

            columns: [
                { title: "Recording ID", width: "120px", field: "recording_id" },
                { title: "Call Type", width: "150px", field: "is_enrollment_text" },
                { title: "Call Center", width: "150px", field: "call_center" },
                { title: "Call Time", width: "200px", field: "time_of_call_text" },
                { title: "Call Length", width: "140px", field: "length_of_call" },
                { title: "Customer Name", width: "180px", field: "customer_name" },
                { title: "Agent Name", width: "180px", field: "agent_name" }
            ],
            sortable: true,
            groupable: true,
            pageable: true,
            scrollable: {
                height: "450px"
            },
            dataSource: {
                transport: {
                    read: {
                        url: queryUrl,
                        type: "POST",
                        dataType: "json"
                    }
                },
                pageSize: 10,
                groupPaging: true,
                serverPaging: true,
                serverSorting: true,
                serverFiltering: true,
                serverGrouping: true,
                serverAggregates: true,
                group: [{
                    field: "customer_name",
                    dir: "asc"
                }, {
                    field: "agent_name",
                    dir: "asc"
                }],
                schema: {
                    data: "Data",
                    total: "Total",
                    groups: "Data",
                    errors: "errors"
                }
            }
        });

 

Below is the formated json data returned from server fetching the first grouping data, the grid display the data without any problem.

{"Total":2860,"Data":[{"hasSubgroups":false,"field":"customer_name","value":"A COLLEEN  WEINBERG","items":null,"subgroupCount":0,"itemCount":3,"aggregates":[]},{"hasSubgroups":false,"field":"customer_name","value":"ABBIGALE  WILLIAMS","items":null,"subgroupCount":0,"itemCount":2,"aggregates":[]},{"hasSubgroups":false,"field":"customer_name","value":"ABRAHAM J WHITEHEAD","items":null,"subgroupCount":0,"itemCount":2,"aggregates":[]},{"hasSubgroups":false,"field":"customer_name","value":"ACIE C JAMES","items":null,"subgroupCount":0,"itemCount":3,"aggregates":[]},{"hasSubgroups":false,"field":"customer_name","value":"ADA d GUYNN","items":null,"subgroupCount":0,"itemCount":2,"aggregates":[]},{"hasSubgroups":false,"field":"customer_name","value":"ADELE J WEBB","items":null,"subgroupCount":0,"itemCount":9,"aggregates":[]},{"hasSubgroups":false,"field":"customer_name","value":"ADELINE M THOMPSON","items":null,"subgroupCount":0,"itemCount":5,"aggregates":[]},{"hasSubgroups":false,"field":"customer_name","value":"ADELLE E MILLER","items":null,"subgroupCount":0,"itemCount":5,"aggregates":[]},{"hasSubgroups":false,"field":"customer_name","value":"ADMA M SEROUGI","items":null,"subgroupCount":0,"itemCount":2,"aggregates":[]},{"hasSubgroups":false,"field":"customer_name","value":"ADOLPHUS  COTTEN","items":null,"subgroupCount":0,"itemCount":1,"aggregates":[]}],"Tag":1,"Message":null,"Description":null}

 

Then I expanded one of the first group to fetch the second group data, the server return the same formated json data:

{"Total":1,"Data":[{"hasSubgroups":false,"field":"agent_name","value":"JACQUELINE TUCKER","items":null,"subgroupCount":0,"itemCount":3,"aggregates":[]}],"Tag":1,"Message":null,"Description":null}

 

But this time, the kendo grid throw this exception:

Uncaught TypeError: Cannot read properties of undefined (reading 'notFetched')
    at init._fetchGroupItems (kendo.all.min.js:28)
    at init._findGroupedRange (kendo.all.min.js:28)
    at init._findRange (kendo.all.min.js:29)
    at init.range (kendo.all.min.js:28)
    at kendo.all.min.js:28
    at Object.n.success (kendo.all.min.js:28)
    at fire (jquery.js?v=637714464013426646:3099)
    at Object.fireWith [as resolveWith] (jquery.js?v=637714464013426646:3211)
    at done (jquery.js?v=637714464013426646:8264)
    at XMLHttpRequest.<anonymous> (jquery.js?v=637714464013426646:8605)

 

What could be the problem? 


Wen Ren
Top achievements
Rank 1
 asked on 02 Nov 2021
1 answer
146 views

My chart as below:

$("#myChart).kendoChart({
                chartArea: {
                    height: 50
                },
                seriesDefaults: {
                    spacing: 0,
                    gap: 0,
                    margin: 0,
                    padding: 0,
                    type: "bar",
                    stack: {
                        type: "100%"
                    }
                },
                series: [
                    {
                        labels: {
                            visible: true,
                            position: "center",
                            font: "bold 16px arial",
                            color: "black",
                            format: "{0}%",
                            template: "# if (value == 0) { #### } else if (value < 7) { ##=value## } else { ##=value#%# } #",
                            background: null
                        },
                        data: [80],
                        color: "#11fa00"
                    }, {
                        labels: {
                            visible: true,
                            position: "center",
                            font: "bold 16px arial",
                            color: "black",
                            format: "{0}%",
                            template: "# if (value == 0) { #### } else if (value < 7) { ##=value## } else { ##=value#%# } #",
                            background: null
                        },
                        data: [0],
                        color: "#0026ff"
                    }, {
                        labels: {
                            visible: true,
                            position: "center",
                            font: "bold 16px arial",
                            color: "black",
                            format: "{0}%",
                            template: "# if (value == 0) { #### } else if (value < 7) { ##=value## } else { ##=value#%# } #",
                            background: null
                        },
                        data: [0],
                        color: "yellow"
                    }, {
                        labels: {
                            visible: true,
                            position: "center",
                            font: "bold 16px arial",
                            color: "black",
                            format: "{0}%",
                            template: "# if (value == 0) { #### } else if (value < 7) { ##=value## } else { ##=value#%# } #",
                            background: null
                        },
                        data: [20],
                        color: "red"
                    }
                ],
                valueAxis: {
                    min: 0,
                    max: 1,
                    line: {
                        visible: false
                    },
                    minorGridLines: {
                        visible: false
                    }
                },
                categoryAxis: {
                    line: {
                        visible: false
                    },
                    minorGridLines: {
                        visible: false
                    }
                },
                valueAxes: {
                    visible: false,
                    majorGridLines: {
                        visible: false,
                    }
                }
            });

Please help me understand what is the difference and why this issue is happening. Thanks

sharanraj
Top achievements
Rank 1
Iron
 answered on 02 Nov 2021
1 answer
290 views

Hello All,

I have a gird with several columns, whose data source is a json(RepProjectData) with more than 500 records. with 7 checkboxes in each row.

I need to implement select all feature. In this when a user checks the checkbox on header then all the below checkboxes(in same column) must get selected.

 headerTemplate: "<span class='title-vertical'><input type='checkbox' class='chkheaderBC'> Business Case</span>",

 template: function (e) {
                if (e.RepBusinessCase == true) {
                    return dirtyField(e, 'RepBusinessCase') + '<input type="checkbox" checked class="chkbxBusinessCase1" />';
                }
                else {
                    return dirtyField(e, 'RepBusinessCase') + '<input type="checkbox" class="chkbxBusinessCase1" />';
                }
            }

 

For this, I have written below code on data bound

   $('.chkheaderBC').change(function (e) {

                   checkAll(e, "RepBusinessCase")

  });

chekAll function-

 function checkAll(e, FieldName) {
        displayLoading();
        var checked = e.target.checked;
        var currentGrid = $("#gridGenerateDocument").data("kendoGrid");
        var data = currentGrid.dataSource.view();
        var rowCnt = RepProjectData.length;   
            for (var i = 0; i < data.length; i++) {
                data[i].set(FieldName, checked);
            }
    }

This code is working and solve the purpose when there are <100 records. But when there are >200 records then it is taking longer than expected. Is there any other way to perform this action with minimum time?

Thanks in Advance :)

 

Nikolay
Telerik team
 answered on 01 Nov 2021
1 answer
605 views

Hi Team,

is it possible to show the sort icon to tell user that "column can be sorted by clicking here" when none of the column is sorted.

thanks

Georgi Denchev
Telerik team
 answered on 28 Oct 2021
1 answer
146 views

How can I render a currency when all I have is a number in cents? I've tried with factor set to 0.01 but this only works for the input once it's selected. When not selected it shows 8999,00 while when I select it, goes to 89,99.

I have a reproducer here: https://dojo.telerik.com/uDUdErOG

      $(".currency").kendoNumericTextBox({
        value: 8999,
        format: "c2",
        factor: 0.01,
        min: 0,
        max: 8999,
        step: 1,
        restrictDecimals: true,
        decimals: 2,
        spinners: false,
      });
    });

Hetali
Telerik team
 answered on 27 Oct 2021
1 answer
205 views
I have a grid where the date is being displayed in "MM/dd/yyyy" format. When the Edit button is clicked, a pop up opens up and the data is read into a date picker. The issue is date is displaying in the format "Wed Dec 18 2019 00:00:00 GMT-0600 (Central Standard Time)". How can I format the date to display in dat picker.
Hetali
Telerik team
 answered on 27 Oct 2021
1 answer
186 views

Could you please help me to change the default design of kendo file upload.

I want to display my custom design on the web page for users. Also , I want to give both functionalities like below

 

---------------------------------------------------------

 

Drag and Drop File or Browse File

 

----------------------------------------------------------

Martin
Telerik team
 answered on 27 Oct 2021
1 answer
160 views

Hi,

I'm trying to avoid dragging column in treelist to very first position, since it's kind of checkbox column and must be the first all the time. I wanted to handle columnReorder event (which i handle anyway) and cancel it, but this approach simply does not work. 

Something like

if (e.newIndex === 0)
            {e.preventDefault();}

Have you got any tips, what to try next, please?

 

Regards, Jaroslav

Georgi Denchev
Telerik team
 answered on 27 Oct 2021
1 answer
388 views

Scroll of  Dropdown tree  is not working when navigate through keyboard's down arrow.

We have similar implementation like below link. and in the provided link scroll bar is also not working when we navigate trough keyboard.

Link: https://dojo.telerik.com/oVoboJeq 

Please  let us know solution/workaround for it. 

 

Thanks!!

Martin
Telerik team
 answered on 27 Oct 2021
1 answer
693 views

Hi

I have implemented Kendo Grid with requirement as below.

Overflow-y should always be set to auto despite of number of rows. This is causing the grid row & header misalignment

Can you suggest how to avoid this misalignment with overflow-y: auto style is retained, is there any way to achieve it?

Dojo here : https://dojo.telerik.com/UqAqAGOw

Screenshot below: Page size is 5 with overflow-y set to auto which distorts the alignment 

Georgi Denchev
Telerik team
 answered on 25 Oct 2021
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
Drag and Drop
Application
Map
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?