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

Radgrid pagesize event

1 Answer 46 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Cush
Top achievements
Rank 1
Cush asked on 05 Jan 2011, 10:36 AM
Hi All

I have a function that resizes a grid page size when the page has loaded,
I have used the "OnClientLoad" event of the main page splitter to fire this function.

However when the function uses an ajax request i get the following error:
Line 24610
Error this_tooltips.length is null or not an object
(I have attached a screen Shot)

This is the code:
Java:
function gridPsize() {
                    var h1 = $find("<%= RadSplitter5.ClientID %>").get_height();
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Grid1PageSize" + h1);
               }
Vb Code
Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest
      If Left(e.Argument, 13) = "Grid1PageSize" Then
            'Set Radgrid1 page size
            Dim pHeight As Integer = CInt(Right(e.Argument, Len(e.Argument) - 13))
            Dim rows As Double = (pHeight - 110) / 30
  
            If rows >= 1 Then
                RadGrid1.PageSize = CInt(rows)
                RadGrid1.Rebind()
            End If
  
            End If
  
    End Sub
The Problem does not occur on initial load of the page, It seems to occur on a re-query of the Grid? But not all the time.
I was wondering if it was related to mouse position on the grid as i have tooltips coded to the grid's ItemDataBound Event, The tooltips were in the ItemCreated Event but i moved them to see if it would cure the problem.

If anyone could shed any light on this it would be most appriciated.

Many Thanks

Regards

Darren

1 Answer, 1 is accepted

Sort by
0
Maria Ilieva
Telerik team
answered on 10 Jan 2011, 10:15 AM
Hi Cush,

Could you please elaborate a bit more on your application? What are the Ajax settings you are using in the RadAjaxManager declaration? Also let me know what the result is if the Ajax on the page is disabled. It will be very helpful if you could open a regular support ticket and send us sample runnable application. Thus we will be able to debug the project locally and advise you further.


Greetings,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Tags
Ajax
Asked by
Cush
Top achievements
Rank 1
Answers by
Maria Ilieva
Telerik team
Share this question
or