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

Paging info text bug if grid is empty

9 Answers 171 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Martin Sura
Top achievements
Rank 1
Martin Sura asked on 14 Jul 2011, 01:43 PM
Hi, 

I have problem with paging total number information in telerik grid.

If grid has no records i get  NaN z undefined message.

Is here any workaround?

Thanks

Martin

9 Answers, 1 is accepted

Sort by
0
Accepted
Atanas Korchev
Telerik team
answered on 14 Jul 2011, 02:23 PM
Hi Martin Sura,

 Thank you for reporting this bug. I am sending you a minified version of the patched telerik.grid.js file. I also updated your Telerik points.

Greetings,
Atanas Korchev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Martin Sura
Top achievements
Rank 1
answered on 14 Jul 2011, 03:23 PM
Thanks :)
0
imad
Top achievements
Rank 1
answered on 12 Aug 2011, 11:36 AM
Hi,

I also noticed when the grid has no records, and the grid is configured with ajax binding and server binding on first load, the grid will also fire the ajax request on load.

is this normal behavior? do the client side grid check at load if it contains data to decide if to fire the ajax call?

Thanks.
0
ashes
Top achievements
Rank 1
answered on 17 Aug 2011, 06:12 AM
I used the given Javascript file but still I am getting the same error .. looks like there are thousands of bugs in Telerik COntrols and they expect developers like us to resolve on our own ... This is totally insane
0
Atanas Korchev
Telerik team
answered on 17 Aug 2011, 07:21 AM
Hello ashes twenty two,

 Are you sure that you have properly updated the JavaScript file? Also make sure the browser cache is clean - you are probably loading the old file.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

0
JorgeMuza
Top achievements
Rank 1
answered on 19 Aug 2011, 08:01 PM
For those interested in know what exactly was changed, to fix the error described above, take a look into the before and after of the following code snippets within telerik.grid.js around line 723:

Before:

total: function (data) {
    if (data) {
        data = this.convert(data);
        return !$.isArray(data) ? data.total || data.Total : data.length;
    }
    return 0;
},


After:

total: function (data) {
    if (data) {
        data = this.convert(data);
        return !$.isArray(data) ? data.total || data.Total || 0 : data.length;
    }
    return 0;
},
0
Jon
Top achievements
Rank 1
answered on 23 Aug 2011, 06:23 PM
The fix doesn't seem to be applied when using Telerik Content Delivery Network:

Registering script:
@(
 Html.Telerik().ScriptRegistrar()
            .jQuery(false)
            .DefaultGroup(group =>
                          group.Add("telerik.common.js")
                              .Add("telerik.grid.js")))

Html:

Please advise.
0
Atanas Korchev
Telerik team
answered on 24 Aug 2011, 06:50 AM
Hello Jon,

 The problem exists in the 2011.2 712 version which is the same version available on CDN. We do not currently upload internal builds to CDN - you need to use the local version of the JavaScript files.

Regards,
Atanas Korchev
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
Gustavo
Top achievements
Rank 1
answered on 26 Sep 2011, 07:02 PM
Thank you.
Tags
Grid
Asked by
Martin Sura
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Martin Sura
Top achievements
Rank 1
imad
Top achievements
Rank 1
ashes
Top achievements
Rank 1
JorgeMuza
Top achievements
Rank 1
Jon
Top achievements
Rank 1
Gustavo
Top achievements
Rank 1
Share this question
or