Pending Review
Last Updated: 25 Aug 2016 17:31 by John
John
Created on: 25 Aug 2016 17:31
Category: UI for ASP.NET AJAX
Type: Feature Request
0
resizetofit
Hello, In one of the pages in our website, we have a RadGrid that uses client-side binding.  Above the grid, there's an "Apply Best Fit" button that executes the following JavaScript:
...
...

applyBestFit: function(tableView)
{
  var columns = tableView.get_columns();

  for (var i = 0; i < columns.length; i++)
    columns[i].resizeToFit(false, true);
}

...
...
In IE, it runs VERY slowly when there's 5,000 grid rows.

I found this post: "http://www.telerik.com/forums/radgrid-with-resizetofit-javascript-issue" and read the recommended link: "http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/performance/grid-performance-optimizations"

I understand that resizeToFit( ) is slow under IE.

I would like to propose that you add a new "MaxRowsToEvaluate" (or similar) parameter to resizeToFit( ) that can be used to control how many grid rows are evaluated when determining the widest size of a column.

With this new parameter, I could pass a value of 25, for example, and know that only up to 25 grid rows will be used in calculating the widest size of a column.  That would speed things up a lot I think.

Using this approach, the resizing would not be perfect, because a cell in the column beyond the "MaxRowsToEvaluate" number of rows may contain a value that's really long, but at least it wouldn't make the browser look like it's hung.

Thanks
0 comments