Telerik Forums
Kendo UI for jQuery Forum
3 answers
142 views
I have a remote data service that is set at the server side to pagesize 100.

I need to get 10000+  records back using a single query.

How do I do that?

I have tried using the add and splice methods on an observableArray object but nothing has worked. I have looked all over the place for an example or something close and have not seen anything.

example attempt from inside DataSource Object:

  schema: {
                data: function (response) {
                    //apply response to field that was in activeQuery
                    totalCount = response.totalCount;
// .set overwrites the returned set every time with the next page of data
                    assetViewModel.set("assets", response.assets);
// length is forever 0 with this
                    assetViewModel.assets_ds = response.assets.splice(assetViewModel.assets_ds.length,0,response.assets);
// tried using .add but this only works iterating through each of the 100 returned items in a loop - not performant
                    // we only have the first page of results from assetDataSource at this point
                  // we can process what we have so far and come back for next page 
                    locationsDataSource.read();
                    return response;
                },

if you need to see more we have to share files off forum thank you!

<update>
found allAssets = allAssets.concat(assetViewModel.assets.slice(0)); is slightly faster than a for loop through response to add items to allAssets

<update #2>
if you have a server that pages out data in small chunks the service calls will be the main slowdown - set expecations appropriately : )
Petur Subev
Telerik team
 answered on 03 May 2013
4 answers
1.5K+ views
Team, 

I would like to send only the changed fields from Kendo grid control to the server during the Update. By default Kendo is sending the entire record to the server even if one field is changed in that record. I would like to send only the updated fields rather than all fields.

How can i do it ?

Also, i would like to fire the update from an external button rather than the toolbar Save button. How to do it ?

Regards,
Bharani 
horo
Top achievements
Rank 1
 answered on 03 May 2013
1 answer
315 views
Is there a way to set the hint when dragging a treeview node in a similar manner to how it's set when using the draggable plugin...without using the draggable plugin? My needs are pretty simple - I have a checkbox on my node, and I would like to hide it during the drag event. Here is some relevant code (I would like to hide the div with class "folder-check"):  

<script id="treeview-template" type="text/kendo-ui-template">
    <div class="FolderTemplate">
        <div class="folder-check checkbox-false"></div>
        <div class="folder-details">
            <input type="checkbox" />
            <span>#= item.Name # (#= item.ItemCount #)</span> 
        </div>
        <div style="clear:both;"></div>
    </div>
</script>

Folders = new kendo.data.HierarchicalDataSource(dataSourceOptions);
    $("#treeview").kendoTreeView({
        dragAndDrop: true,
        dataSource: Folders,
        dataTextField: "Name",
        template: kendo.template($("#treeview-template").html()),
        select: onFolderSelect,
        drop: onFolderDrop,
        dragstart: onFolderDragStart,
        drag: onFolderDrag,
        dataBound: onDataBound
    });

function onFolderDragStart(e) {
    if (this.dataItem(e.sourceNode).IsSpecialFolder)
        e.preventDefault();
}

Thanks so much.
Alex Gyoshev
Telerik team
 answered on 03 May 2013
1 answer
288 views
Just to let you know that the documentation for kendo.init() seems to be missing at http://docs.kendoui.com/api/framework/kendo#init. even though it is referenced from http://docs.kendoui.com/getting-started/data-attribute-initialization.

Thanks,
Gary
Petyo
Telerik team
 answered on 03 May 2013
4 answers
141 views
Hello, I have the autoFilter set to false, but when I hit the enter key the search is not executed.

_searchDS = new kendo.data.DataSource({
        serverFiltering: true,
        transport: {
            read: function (options) {
                var filter = options.filter ? options.filter.filters[0].value : '';
                $.ajax({
                    url: _serviceConst + '/Search?q=' + filter,
                    type: 'GET',
                    success: function (result) {
                        console.log('result came back: ' + result.Object.length);
                        options.success(result);
                    },
                    error: function (xhr, sts, msg) {
 
                    }
                });
            }
        },
        schema: { data: "Object", errors: "Error" }
    });
    if (_searchMV == null) {
        _searchMV = $("#searchresults").kendoMobileListView({
            dataSource: _searchDS,
            template: $("#searchresults-template").text(),
            filterable: true,
            filterable: { autoFilter: false },
            click: function (e) {
            }
        }).data("kendoMobileListView");
    } else {
        _searchMV.setDataSource(_searchDS);
    }
I have also tried the read statement as:
read: {
                url: _serviceConst + '/Search',
                dataType: 'json'
            },
            parameterMap: function (options) {
                var filter = options.filter ? options.filter.filters[0].value : '';
                var parameters = {
                    q: filter
                }
                return parameters;
            }
Both do not execute the search on Enter key.
Thanks.
Barry
Top achievements
Rank 1
 answered on 03 May 2013
1 answer
518 views
I have the code below to bind data to my grid on the client.  The grid is bound to the data, but I am having trouble getting the paging working.  Here is my code"

$("#btnSearch").click(function () {           
            $.ajax({
                url: "/Booking/GetBookingLookupData",
                type: "POST",
                data: null,
                contentType: "application/json"
            }).success(function (data) {
                
                var d = data;
                var gdata = $("#grid").data("kendoGrid");

                var ds = new kendo.data.DataSource({

                    data: d,
                    pageSize: 10,                    
                    serverPaging: false

                });             
               
                ds.fetch(function () {    
                    ds.serverPaging = false;
                });               
                gdata.dataSource = ds;
                gdata.refresh();
               
            });

        });

All of the data gets bound to the datasource.  I see all of the rows if I do not make it pageable, but the paging is not working.  What am I missing?

Thanks,

Wayne
Wayne
Top achievements
Rank 1
 answered on 02 May 2013
1 answer
120 views
i woul dlike to know how you would apply this kendo UI stuff in Xamarin
SwanB
Top achievements
Rank 1
 answered on 02 May 2013
5 answers
451 views
Is there a way to make the slices in a pie chart explode onClick event?
Jim
Top achievements
Rank 1
 answered on 02 May 2013
1 answer
250 views
Hello

My grid has navigatable set to false, and editable set to true, I am controlling the cell navigation through my own code. The reasons I am doing this are
  • InCell editing - turn on cell editing when a cell is selected, data is saved when the user navigates away from the cell. 
  • Keyboard support - allow the user to navigate using Enter key (to go down the column) and Tab key (to go across the row) to immediately start editing the next cell. Also using the arrow keys to navigate.
  • Additional information in popup form - to complicate the matter even more, some cells may require additional information which the user can enter using a pop form triggered by the grid.save event. This took away the focus on the grid and therefore has to be programmatically restored back to the grid once the popup form is closed.
I would like to separate saving from grid navigation. Ie. the user can continue editing cells while the data source update itself in the background. One particular problem I ran into is after a cell content is saved, the grid reset its edit cell and lose focus of the current cell.

Is it possible for the grid to not control the navigation, and not control the edit mode toggleing? 
Petur Subev
Telerik team
 answered on 02 May 2013
6 answers
342 views
Hello.

When there is more than one chart on the same page the lines in the ( on all other charts) will be painted only in the width length of the first chart of the page.

As you can see in my attached print screen the first chart goes from 26 december to 24 of january, and is smaller than the charts in below, and the lines on the 2 graphs below is just painted until the width of the first chart. ( and i confirmed that there is values on the other charts until 24 January)

To overcome this i had put a dummy chart on a div, and set absolute position to outside of the screen, because if i set the div to hidden, all the other charts will not be painted.

Hope you can solve this bug.

Best regards
Pedro

Carel du Toit
Top achievements
Rank 1
 answered on 02 May 2013
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
Drag and Drop
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
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?