Telerik Forums
Kendo UI for jQuery Forum
4 answers
561 views

Hello.

We are trying to implement pagination (with virtual scrolling instead of actual pages) for every group of Grid widget. So, we have Grid with serverPaging, serverGrouping and virtual scrolling. As far as I understand, Kendo Grid doesn't support paging if it's grouped. So, the idea is to return from server empty grouped results (with empty items for every group), collapse all groups by default and then after user opens a group - send separate request and populate just this particular group.

Could you please help us with implementation showing an example of something similar or tell any better way to reach the goal?

Just to make it clear - currently our grouped (aggregated) data can have millions of rows in every group.

 

Thank you.

Max

Nikolay Rusev
Telerik team
 answered on 19 Aug 2016
3 answers
254 views

We've been using different themes for our application, and are having some trouble with the "Flat" theme.

When adding icons to widget contents (ex. Kendo Window), the icons don't show up. Reason seems simple: both icons and widget background are white. :)

This can be seen easily in the icons demo page (switch to Flat theme):

http://demos.telerik.com/kendo-ui/styling/icons

Any plans to make Flat theme work the same way as other themes, or any workarounds for this?

Iliana Dyankova
Telerik team
 answered on 19 Aug 2016
5 answers
1.7K+ views

Hi, 
I have searched all the document & demo, but no records about how to send costom para(argument) to event handler.

1. In jQuery, we could do this:
jQuery("#test").bind("keyup",{sendpara: thepara},function(event) {
alert(event.data.sendpara);
});
but I tested kendoUI, it seems to destroy this function. if I run:
var editor = jQuery("#test").data("kendoEditor");
 editor.bind("keyup",{sendpara: thepara},function(event) {
alert(event.data.sendpara);
});
The event  will not be fired(remove the {sendpara: thepara}, the event will fire).

2. I found this:
http://www.kendoui.com/forums/kendo-ui-framework/mvvm/passing-parameters-through-html-bindings-mvvm.aspx

it says we could:
var viewModel = kendo.observable({
    Id: "users/1",
    Points: 10,
    ReducePoints: function(id) {
        console.log(this.get("Id"));
    }
});
So I changed my code to:
  jQuery("#test").kendoEditor({
   sendpara:"123" });
 
var editor = jQuery("#test").data("kendoEditor");
 editor.bind("change",function(event) {
   alert("b:"+ this.get("sendpara") );
   });
But the runtime error is thrown:  there is no this.get method....

3. At last, I found this:
http://www.kendoui.com/forums/kendo-ui-web/numeric-textbox/get-element-id-from-change-event-handler.aspx

So I changed my code to:
jQuery("#test").kendoEditor();
  
var editor = jQuery("#test").data("kendoEditor");
 editor.bind("change",function(event) {
   alert("b:"+this.element.attr("sendpara") );
   });
So if I want to send a para named sendpara, I need to set it to  the "#test" element as an attribute. then get it like above..
This is really not very good.

So the general question is this: where can I find documentation on the properties and methods of the event argument parameter?
Or kendoUI not really support to send para to an event handler?

If so, that's really a bad news, because it's very  ordinary  need to send some paras in to event handler, and to handle some ajax call or function to send this paras to the server, and so on.


yours,
Ivan

Dimo
Telerik team
 answered on 19 Aug 2016
1 answer
96 views
Because the rendering indication of the screen takes time and wants to suppress half of the processing time to degree, I investigate a solution.
Dimo
Telerik team
 answered on 19 Aug 2016
2 answers
237 views
This is my master grid

 

$(document).ready(function() {
    $("#grid").kendoGrid({
        height: 800,
        sortable: true,
        pageable: true,
        selectable: "row",
        filterable: {
            mode: "row"
        },
        editable: { //disables the deletion functionality
            update: false,
            destroy: false
        },
        scrollable: true,
        groupable: true,
        pageable: {
            pageSizes: [10, 25, 50, 100],
            refresh: true,
            buttonCount: 5

 

 

This is the subgrid, when I click the save button, it never make to the POST to the php script. Is there a bug I have to make a event for make the POST?

 

01.function detailInit(e) {
02.           // get a reference to the current row being initialized
03.           var detailRow = e.detailRow;
04. 
05.           detailRow.find(".subgrid").kendoGrid({
06.               dataSource: {
07.                   transport: {
08.                       read: "./data/getDetails.php",
09.                       update: {
10.                           url: "./data/getDetails.php",
11.                           type: "POST"
12.                        }
13.                   },
14.                   schema: {
15.                       data: "data"
16.                   },
17.                   serverFiltering: true,
18.                   filter: {field: "candidate_id", operator: "eq", value: e.data.candidate_id}
19.               },
20.               sortable: true,
21.               pageable: true,
22.               selectable: "row",
23.               height:300,
24.               pageable: {
25.                   pageSizes: 5,
26.                   refresh: true,
27.                   buttonCount: 5
28.               },
29. 
30.               //rowTemplate: kendo.template($("#rowTemplate").html()),
31.               columns: [
32. 
33.                   {title: "Task", field: "ARS",width: "100px",filterable: {
34.                       cell: {
35.                           showOperators: false
36.                       }
37.                   }},
38.                   {title: "Score", field: "Value",width: "250px"},
39.                   {  showOperators: false}
40.               ],
41.               detailInit: detailInit,
42.               editable: true,
43.               navigable: true,
44.               toolbar: [ "save", "cancel" ]
45. 
46.           });
47.       }
48. 
49.   });

 

 

Please advice, I had been working on it for a while, still havent figure out the details. To make this work.

 

Do I have to define the schema to fix the problem? But even without it , everything looks great

 

Daniel
Telerik team
 answered on 19 Aug 2016
3 answers
182 views

Hi, 

Is it possible to use different editable modes for different actions? For example; when creating a new record, I want to use the "popup" window option, but when editing, I'd like to be able to do so "inline".

Thanks, 
Grant

Rosen
Telerik team
 answered on 19 Aug 2016
1 answer
149 views

Following is my grid.

 

$("#grid").kendoGrid({
            selectable: "single cell",
            allowCopy: true,
            change: function(e) {
                           var selected = this.select();
                           var row = this.select().closest("tr");
                           selectedRow = this.dataItem(row);
                           deselectSelection();
                       },
                       excel: {
                           fileName: "Report.xlsx",
                           allPages:true,
                           filterable: true
                       },
                       dataSource: {
                           schema: {
                                    model: {
                                        fields: columnSchemaModel
                                    }
                                },
                           transport: {
                               read: function (e) {
                                e.success(reportList);
                               }
                             },
                           pageSize: 500,
                           aggregate: aggregateList,
                           change: function(e) {
                            var dataSource = this;
                            if (typeof dataSource.filter() != "undefined") {
                                app.fltrButton.enabled = true;
                               }    
                            }

....

 

I am trying to capture datasource change when filter by column. Change function fires as expected. ' app.fltrButton.enabled = true; ' is a variable of button class. If it set to true, css class of button changes. However it doesn't get effect unless I click on another parallel button. So it's the html that doesn't get update, not the value. Please provide a suggestion.

Dimo
Telerik team
 answered on 19 Aug 2016
5 answers
137 views

How can I dynamically insert new item after/before specific item or at the beginning. The only method is add.

Menu, ContextMenu, TabStrip, PanelBar, Splitter have append, insertAfter and insertBefore methods.

Vessy
Telerik team
 answered on 19 Aug 2016
4 answers
115 views

I need to build a drawing tool which can save to a stream (possibly JSON) and load form the same stream either to display or make changes.

This scenario does not seem to be supported by the drawing API but since the Surface has a draw method, I am assuming it has an internal representation of drawing objects which can be saved and reloaded.

What would be the best approach to achieve this.

Would you have a basic dojo/fiddle available?

Jack
Top achievements
Rank 2
Iron
 answered on 18 Aug 2016
11 answers
366 views

We are trying to make our applications compliant with the Web Content Accessibility Guidelines (WCAG) (https://www.w3.org/TR/WCAG20/).  One of the requirements is that buttons have text associated with them.  

When I created a grid (markup provided below), it fails WCAG compliance because the filter buttons in the column headers do not have text associated with them.  I found a way to add the text into the span using javascript but it seems like there should be a better way.  

Then I noticed that your demo grid (http://demos.telerik.com/kendo-ui/grid/filter-menu-customization) has the text property set.  If I inspect the markup for one of the filter buttons in your demo, I see this:  

<a class="k-grid-filter" href="#" tabindex="-1"><span class="k-icon k-filter">Filter</span></a>

So my question is...how did the text property of the span get the value "Filter"?  And how can I accomplish that in my grid defined as follows:

 

 

    @(Html.Kendo().Grid<Staff.Models.Employee>()

    .Name("grdEmployees")
    .Columns(columns =>
    {
        columns.Bound(p => p.FirstName).Width("9%").Title("First Name").Filterable(f => f.Extra(false).Operators(o => o.ForString(s => s.Clear().Contains("Contains").IsEqualTo("Is equal to").IsNotEqualTo("Is not equal to").StartsWith("Starts with").EndsWith("Ends with"))).Cell(cell => cell.Operator("Contains")));
        columns.Bound(p => p.LastName).Width("9%").Title("Last Name").Filterable(f => f.Extra(false).Operators(o => o.ForString(s => s.Clear().Contains("Contains").IsEqualTo("Is equal to").IsNotEqualTo("Is not equal to").StartsWith("Starts with").EndsWith("Ends with"))).Cell(cell => cell.Operator("Contains")));
        columns.Bound(p => p.OfficeDesc).Width("25%").Title("Office").MinScreenWidth(900).Filterable(f => f.Extra(false).Operators(o => o.ForString(s => s.Clear().Contains("Contains").IsEqualTo("Is equal to").IsNotEqualTo("Is not equal to").StartsWith("Starts with").EndsWith("Ends with"))).Cell(cell => cell.Operator("Contains")));
        columns.Bound(p => p.WorkUnitDesc).Width("15%").Title("Work Unit").Filterable(f => f.Extra(false).Operators(o=> o.ForString(s => s.Clear().Contains("Contains").IsEqualTo("Is equal to").IsNotEqualTo("Is not equal to").StartsWith("Starts with").EndsWith("Ends with"))).Cell(cell => cell.Operator("Contains"))).MinScreenWidth(900);
        columns.Bound(p => p.EMail).Width("18%").Title("Email").Filterable(f => f.Extra(false).Operators(o=> o.ForString(s => s.Clear().Contains("Contains").IsEqualTo("Is equal to").IsNotEqualTo("Is not equal to").StartsWith("Starts with").EndsWith("Ends with"))).Cell(cell => cell.Operator("Contains")));
        columns.Bound(p => p.Phone).Width("8%").Title("Phone").Filterable(f => f.Extra(false).Operators(o => o.ForString(s => s.Clear().Contains("Contains").IsEqualTo("Is equal to").IsNotEqualTo("Is not equal to").StartsWith("Starts with").EndsWith("Ends with"))).Cell(cell => cell.Operator("Contains")));
        columns.Bound(p => p.Title).Width("16%").Title("Title").Filterable(f => f.Extra(false).Operators(o=> o.ForString(s => s.Clear().Contains("Contains").IsEqualTo("Is equal to").IsNotEqualTo("Is not equal to").StartsWith("Starts with").EndsWith("Ends with"))).Cell(cell => cell.Operator("Contains"))).MinScreenWidth(900); 
    })
    .ClientRowTemplate(
        "<tr >" +
            "<td >#: FirstName# </td>" +
            "<td >#: LastName# </td>" +
            "<td >#: OfficeDesc #</td>" +
            "<td >#: WorkUnitDesc #</td>" +
            "<td ><a href='mailto:#: EMail #' title='Send Email' alt='Send Email' >#: EMail #</a></td>" +
            "<td style='white-space:nowrap;' >#: Phone #</td>" +
            "<td >#: Title #</td>" +
            "</tr>"
        )
    .ClientAltRowTemplate(
            @"<tr class=""alt-row"" >" +
            "<td >#: FirstName# </td>" +
            "<td >#: LastName# </td>" +
            "<td >#: OfficeDesc #</td>" +
            "<td >#: WorkUnitDesc #</td>" +
            "<td ><a href='mailto:#: EMail #'>#: EMail #</a></td>" +
            "<td style='white-space:nowrap;' >#: Phone #</td>" +
            "<td >#: Title #</td>" +
            "</tr>"
        )
    .Pageable()
    .Sortable()
    .Filterable()
    .DataSource(dataSource => dataSource
        .Ajax()
        .PageSize(20)
        .Read(read => read.Action("Staff_Read", "Staff"))
        .Filter(f => f.AddRange(ViewBag.filters))
    )
    )

Thanks,

 

Ray

 

Raymond
Top achievements
Rank 1
 answered on 18 Aug 2016
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
ScrollView
Switch
TextArea
BulletChart
Licensing
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
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?