Refresh button for grid?

1 Answer 3195 Views
Grid
Jason
Top achievements
Rank 1
Jason asked on 29 Oct 2012, 05:03 PM
I just migrated from the ASP.NET MVC controls, and would like to have the refresh button show on the bottom of the grid like it did in the old controls, is this possible with kendo?

Thanks

1 Answer, 1 is accepted

Sort by
0
Accepted
Iliana Nikolova
Telerik team
answered on 29 Oct 2012, 05:41 PM
Hi Jason,

The refresh button in Kendo UI Grid for ASP.NET MVC is not enabled by default, however it can be displayed using the following configuration: 
.Pageable(pager => pager     
   .Refresh(true)
)

Regards,

Iliana Nikolova
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Jason
Top achievements
Rank 1
commented on 29 Oct 2012, 07:00 PM

Appreciate the answer, one thing that might be nice is the ability to turn on refresh but not paging...
Josh
Top achievements
Rank 1
commented on 16 Jan 2014, 05:15 PM

+1 on the request, refreshing and paging should not be so tightly coupled
Iliana Nikolova
Telerik team
commented on 20 Jan 2014, 12:11 PM

Hello guys,

We will appreciate it if you submit this idea as a feature request at Kendo UI UserVoice page - this way the community would be to evaluate it and if the suggestion gains popularity we will consider its implementation for future releases. 

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Carl
Top achievements
Rank 1
commented on 03 May 2014, 07:56 PM

Please add your comments and votes for a refresh button on the grid.  Here's the feedback link:

http://kendoui-feedback.telerik.com/forums/127393-telerik-kendo-ui-feedback/suggestions/5751154-grid-refresh-should-independent-from-pageable-buil
Ezequiel
Top achievements
Rank 2
commented on 26 Sep 2014, 02:14 PM

Is already available an option to have the footer with refresh button, but no paging?

I want to display a grid with a defined height, with option to refresh, total number of rows but I don't want paging.
Iliana Nikolova
Telerik team
commented on 29 Sep 2014, 06:37 AM

Hi Ezequiel,

In order to achieve this you should configure the pageable object. For your convenience here is a dojo example.

Regards,
Iliana Nikolova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Ezequiel
Top achievements
Rank 2
commented on 29 Sep 2014, 11:00 AM

Iliana, but in this example, if you set info to true, you can see that it's displaying 20 of 91.

I want to display all 91 rows in one page, but add the refresh button.

Ezequiel
Top achievements
Rank 2
commented on 01 Oct 2014, 02:53 PM

Here is an issue that I have, here is my Detail Grid:
<%: this.Html.Kendo().Grid<EditableContainer>()
                                    .Name("GridContainers_#=Group#")
                                    .DataSource(ds => ds.Ajax().ServerOperation(true)
                                                        .Read("ReadContainer", "CadastrarCargaContainer", new { embarqueId = "#=EmbarqueId#", depositoId = "#=DepositoId#", transportadorId = "#=TransportadorId#", tipoContainerCodigo = "#=TipoContainerCodigo#", dataPrevisao = "#=DataPrevisaoParam #" })
                                                        .Update("UpdateContainer", "CadastrarCargaContainer", new { embarqueId = "#=EmbarqueId#", depositoId = "#=DepositoId#", transportadorId = "#=TransportadorId#", tipoContainerCodigo = "#=TipoContainerCodigo#", dataPrevisao = "#=DataPrevisaoParam #" })
                                                        .Model(m =>
                                                        {
                                                            m.Id(f => f.Id);
                                                        })
                                                        .Events(ev => ev.Error("error_handler.bind({WidgetID: 'GridContainers_#=Group#'})")))
                                    .Columns(columns =>
                                    {
                                        columns.Bound(c => c.Id).Hidden(true);
                                        columns.Bound(c => c.NumeroContainer).Width("120px");
                                        columns.Bound(c => c.Tara).Format("{0:N}").Width("25px");
                                        columns.Bound(c => c.PesoBrutoVolumes).Format("{0:N}").Width("75px");
                                        columns.Bound(c => c.NomeMotorista).Width("125px");
                                        columns.Bound(c => c.NumeroIdentidade).Width("75px");
                                        columns.Bound(c => c.Veiculo).Width("75px");
                                        columns.Command(command =>
                                        {
                                            command.Edit();
                                        }).Width("155px");
                                    })
                                    .Events(ev => ev.Save("SaveContainer"))
                                    .Pageable(page => page.Refresh(true).Input(false).PreviousNext(false).Numeric(false).Info(true))
                                    .Editable(edit => edit.Mode(Kendo.Mvc.UI.GridEditMode.InLine))
                                    .ToClientTemplate()
            %>


Attached is the result.
You see that I have 13, but it's only displayed 1-10.

Thanks.
Iliana Nikolova
Telerik team
commented on 02 Oct 2014, 08:42 AM

Hi Ezequiel,

For this scenario you should get the total of records and set it to as PageSize. As an example: 
var dataSource = $("#grid").data("kendoGrid").dataSource,
   totalItems = dataSource.total();
 
   dataSource.pageSize(totalItems);

Regards,
Iliana Nikolova
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Jason
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Share this question
or