0

Am using kendo grid , I need to do optimization for grid columns. Am doing Optimization now, but its not effective. Am looping on each td of each tr and calculating the width of td and if it is max width then am setting the width to column. So, if i have more number of records in the grid(ex:20000), then its taking lot time to calculate. Is there any other way to approach my requirement.

Anil Talla
  • 709
  • 5
  • 19
  • Any examples of what you have done? – fuyushimoya Jun 20 '15 at 13:10
  • @fuyushimoya I didnt prepare any example. Simply just looping on html table tr's and then looping on td's of each tr. – Anil Talla Jun 20 '15 at 14:00
  • Then, whats the `max width`, is it means the the `td`'s width is the largest among other `td`s – fuyushimoya Jun 20 '15 at 14:07
  • bind grid to remote data, not local binding so you will work on first 10 rows (if paging is enabled) not on 20000 and i recommend this approach in columns widths http://docs.telerik.com/kendo-ui/web/grid/walkthrough#column-widths if u want auto-sized columns – softawareblog.com Jun 20 '15 at 17:24
  • @TarekNajem there is a page size change option. So we can change the page size. In that case am facing problem. Unfortunately I Can not remove the page size Option. – Anil Talla Jun 21 '15 at 04:07

1 Answers1

0

In your case, it seems you are dealing with bulk of data which is taking considerable load time and you want to reduce it. So here I would recommend you to go for Server side Pagination. Server pagination is very effective and reduce load time. It loads data in chunks, I believe it would help you, below are some links which can help you out :

How to implement Server side paging in Client side Kendo UI grid in asp.net mvc

https://www.telerik.com/blogs/how-to-get-the-best-grid-performance

Ankita_Shrivastava
  • 1,225
  • 11
  • 9