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

Need info on applying custom action, filter and Export on Grid

2 Answers 306 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Venkat
Top achievements
Rank 1
Venkat asked on 28 Oct 2014, 07:10 AM
Hi,

We have some functionality to be implemented are:

Functionality 1:

We need to allow a user add or update data in batch. So, I am able to try and use this feature by using Batch Editing of grid. As per the grid functionality we need to use toolbar's 'Save' button to get the new or updated records for save. When we use the grid's Save button it will call respective action method by posting only new and updated records from Grid. But I would like to have my own button to call action method which get all the records from the Grid irrespective of added or updated ones so, I can read complete list of data and send it to DB.

Functionality 2:

Right now the Grid has Filter to be enabled on column wise. But I need to implement the Search/Filter on whole grid data by mean when use input a value on text box I would like to apply the search on whole grid data and filter it.

Functionality 3:

We need to export the Grid data to excel whether complete grid data or filtered/ searched data.

Is there a way to implement these and can you please share some examples if you have?

Regards!

2 Answers, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 29 Oct 2014, 04:06 PM
Hello Venkat,

1. Get all Grid data items

You can use a custom button (e.g. in a toolbar template) and make it execute the Grid dataSource's view() method, which returns all data items on the current page.

http://demos.telerik.com/kendo-ui/grid/toolbar-template

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-toolbar.template

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#fields-dataSource

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-view


2. Custom filtering

Use the Grid dataSource's filter() mehod and pass the desired parameters.

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-filter


3. Export to Excel

With older Kendo UI versions, you can use the techniques described in the documentation below. Built-in Excel and PDF export has just been introduced in the Q3 2014 Beta. In both cases, client exporting works for the current data only. For all data, use server-side exporting, which is outside the scope of Kendo UI.

http://docs.telerik.com/kendo-ui/web/grid/print-export#exporting

http://demos.telerik.com/kendo-ui/Beta/grid/excel-export

Regards,
Dimo
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Venkat
Top achievements
Rank 1
answered on 30 Oct 2014, 06:09 AM
Hi Dimo,

Thanks for the reply, will check these links and get back to you.

Regards!
Tags
Grid
Asked by
Venkat
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Venkat
Top achievements
Rank 1
Share this question
or