This is a migrated thread and some comments may be shown as answers.

Adding multiple records to DataSource

0 Answers 73 Views
Data Source
This is a migrated thread and some comments may be shown as answers.
Mr. Gravity
Top achievements
Rank 1
Mr. Gravity asked on 27 Nov 2012, 10:15 PM
I have a situation where the data for the grid will be returned in batches of 1000 records. I need to poll for this data and update the grid. I've tried using dataSource.add() and passing in a bunch of items, but it only ever adds the first item. Am I going to need to add one item at a time to the dataSource or is there something I am missing?

var myGrid = $('#grid').data('kendoGrid');
myGrid.dataSource.add({
                    name: 'Name 2',
                    fileType: 'Microsoft Outlook Note',
                    pathName: '/Evidence 2/Something/Collection/'
                },
                {
                    name: 'Name 3',
                    fileType: 'Microsoft Word Document',
                    pathName: '/Evidence 3/Something/Collection/'
                },
                {
                    name: 'Name 4',
                    fileType: 'JPEG/JFIF Image',
                    pathName: '/Evidence 4/Something/Collection/'
                },
                {
                    name: 'Name 1',
                    fileType: 'Portable Document Format',
                    pathName: '/Evidence 1/Something/Collection/'
                },
                {
                    name: 'Name 2',
                    fileType: 'Microsoft Outlook Note',
                    pathName: '/Evidence 2/Something/Collection/'
                },
                {
                    name: 'Name 3',
                    fileType: 'Microsoft Word Document',
                    pathName: '/Evidence 3/Something/Collection/'
                },
                {
                    name: 'Name 4',
                    fileType: 'JPEG/JFIF Image',
                    pathName: '/Evidence 4/Something/Collection/'
                },
                {
                    name: 'Name 1',
                    fileType: 'Portable Document Format',
                    pathName: '/Evidence 1/Something/Collection/'
                });

No answers yet. Maybe you can help?

Tags
Data Source
Asked by
Mr. Gravity
Top achievements
Rank 1
Share this question
or