This question is locked. New answers and comments are not allowed.
Hello,
First of all, thanks a lot for your wonderful MVC extensions. However, there is a minor issue with the grid in latest (Q1 2011) release.
I use mvc grid with ajax binding and grouping enabled, plus there are client group and footer templates defined for certain columns. Yesterday, I have noticed that in my application OnDataBound client event is not fired sometimes.
I investigated further and discovered that it happens when there is a filtering applied with some predicate that evaluates to false for all the rows (so that no rows are displayed).
Tracing showed that the following piece of javascript fails with "object is null of undefined" error:
So, to workaround this issue, I just changed template function in telerik.grid.js file and added code to check if data variable is not undefined. It worked, but I'm sure that you as developers will suggest something better in next releases.
See attached sample application, if necessary.
Thanks,
Andrew.
First of all, thanks a lot for your wonderful MVC extensions. However, there is a minor issue with the grid in latest (Q1 2011) release.
I use mvc grid with ajax binding and grouping enabled, plus there are client group and footer templates defined for certain columns. Yesterday, I have noticed that in my application OnDataBound client event is not fired sometimes.
I investigated further and discovered that it happens when there is a filtering applied with some predicate that evaluates to false for all the rows (so that no rows are displayed).
Tracing showed that the following piece of javascript fails with "object is null of undefined" error:
var p=[];with(data){p.push('Total Count: ', Count ,'');}return p.join('');
So, to workaround this issue, I just changed template function in telerik.grid.js file and added code to check if data variable is not undefined. It worked, but I'm sure that you as developers will suggest something better in next releases.
See attached sample application, if necessary.
Thanks,
Andrew.