Unable to cast object of type 'Telerik.Web.UI.RadGrid' to type 'Telerik.Web.UI.GridTableView'.

11 posts, 0 answers
  1. Tom
    Tom avatar
    2 posts
    Member since:
    Jul 2008

    Posted 02 Jul 2008 Link to this post

    Before upgrading to ASP.NET AJAX  from ASP.NET the rad grid grouping worked. Since upgrading however, as soon as a drag and drop grouping is preformed we are greeted with this error:

    Unable to cast object of type 'Telerik.Web.UI.RadGrid' to type 'Telerik.Web.UI.GridTableView'.

    I created a test page where I bound test data to a newly add rad grid and enabled grouping and it still blows up. 

    I tried looking through the examples, but they either leave much to be desired or I followed them correctly and something is still not quiet right. Any ideas?

  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 03 Jul 2008 Link to this post

    Hi Tom,

    Can post this test page or send us via support ticket?

    Greetings,
    Vlad
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Dave
    Dave avatar
    9 posts
    Member since:
    Nov 2006

    Posted 27 Jul 2008 Link to this post

    I am working with the trial verson of 2008 and am having the same problem.  Everything works except allowing the user to group.  Dragging a column to the group header box ALWAYS causes this error.  I have tried binding to a data source object, advanced data binding to a dataset I create and just manually adding rows.  I have also tried client-side and server-side grouping.

    Nothing works.  I am trying to convince my client to purchase this package, as there are a lot of other controls that they would benefit from.  But the page on which this grid sits is a pretty crucial one for their application, so this absolutely has to work for them to spend the money.  And for the life of me, I can't get even your demos to work without this problem.

    So the question: is this fixed in the new release?  Or is there something else I am not understanding? 

    -Dave Ferreira
  5. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 28 Jul 2008 Link to this post

    Hello Dave,

    Can you reproduce the same in our online examples? Can you send us an example where we can reproduce this?

    Sincerely yours,
    Vlad
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  6. Tom
    Tom avatar
    2 posts
    Member since:
    Jul 2008

    Posted 28 Jul 2008 Link to this post

    Hi Dave, 

        I'll give you my answer, though I'm not sure how much this will help you. My problem was because of the updates, one of my co-workers updated to lastest version from another and Telerik changed their namespaces. They (my co workers) corrected the code as descirbed in the telerik docs for upgrading but what was not mentioned in teleriks documentation was the web config. I didn't know what was old telerik or new telerik, so I rolled back the version of the web config and rebuilt it (everything but telerik). I then created a new project with the telerik controls, took the web config from that and added the telerik changes/additions to my newly rebuilt web config.  Presto change-o it all magically worked again.

    Hope this helps, good luck!

    -Tom
  7. Dave
    Dave avatar
    9 posts
    Member since:
    Nov 2006

    Posted 28 Jul 2008 Link to this post

    Thanks, Tom and Vlad.  Found my problem although this is not specifically documented anywhere that I can tell.

    The issue boiled down to this: if I tried to run either the demo or my code in VS 2005, then I had no problems.  If I tried to run either in VS2008, then I had the issue above.  The reason was because VS2008 (and compiling against framework version 3.5) looks for the HTTP handler for Telerik resources in the SYSTEM.WEB section and not in the old section.  When I added the control to the page from the toolbox, everything else seems to have been added except this (in other words, the reference was properly added to the project, because as far as I can tell that and the HTTP handler line in the old section were the only things added).

    So once I added the handler statement to the right section for my project, all the problems went away.  Curious, though, that IE did not churn up an error when loading the page about scripts being missing, etc.  And even without that statement, skinning was working as expected. 

    Thanks for your help.

    -Dave Ferreira
  8. Vance Smith
    Vance Smith avatar
    36 posts
    Member since:
    Jun 2012

    Posted 27 Jan 2009 Link to this post

    I am having the same problem. What is the handler that needs to be added to System.Web. Can someone give me an example?

    Thanks,

    Vance
  9. Dave
    Dave avatar
    9 posts
    Member since:
    Nov 2006

    Posted 27 Jan 2009 Link to this post

    Morning, Vance...

    Here is what I had to add to get this to work.  I also added the spell check line, too.  Note that if you use the spell check module, you will need to change the version number below to match your assembly.

    -Dave Ferreira

            <!--  HTTPHANDLERS --> 
            <httpHandlers> 
                <add path="Telerik.Web.UI.WebResource.axd" verb="*" type="Telerik.Web.UI.WebResource, Telerik.Web.UI" validate="false" /> 
                <add path="Telerik.Web.UI.SpellCheckHandler.axd" verb="*" type="Telerik.Web.UI.SpellCheckHandler, Telerik.Web.UI, Version=2008.1.515.20, Culture=neutral, PublicKeyToken=121fae78165ba3d4" validate="false" /> 
            </httpHandlers> 
     
  10. Mark Meikle
    Mark Meikle avatar
    16 posts
    Member since:
    Mar 2010

    Posted 18 Apr 2010 Link to this post

    That helped me.  Thanks.
  11. Mark Meikle
    Mark Meikle avatar
    16 posts
    Member since:
    Mar 2010

    Posted 18 Apr 2010 Link to this post

    Hmm.  The problem is back again.  It seems to come and go.  Shutting down Visual Developer Express 2008 and starting up again helps.
  12. Thenmozhi
    Thenmozhi avatar
    26 posts
    Member since:
    May 2009

    Posted 28 Jan 2011 Link to this post

    Hi,

    I have also faced the same issue while i migrate my project from 2005 to 2008.

    I found this thread it solved my issue.

    We have to remove the  <xhtmlConformance mode="Legacy"/> tag from webconfig.

    Need more detail read below one

    http://www.telerik.com/community/forums/aspnet-ajax/grid/255649-unable-to-cast-object-of-type-telerik-web-ui-radgrid-to-type-telerik-web-ui-gridtableview.aspx

    Thanks
    Thenmozhi.R
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017