Radgrid pagesize event

2 posts, 0 answers
  1. Cush
    Cush avatar
    88 posts
    Member since:
    Apr 2010

    Posted 05 Jan 2011 Link to this post

    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
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 10 Jan 2011 Link to this post

    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.
Back to Top