GridView Appearance Problem

3 posts, 0 answers
  1. David
    David avatar
    5 posts
    Member since:
    Nov 2011

    Posted 28 Mar 2012 Link to this post

    Ok, so I’m having a really weird problem with the GridView control in a project I've been working on. I’ve been trying to figure out what is going on all day and I haven’t been able to. Basically I’m trying to swap out the standard DataGridView for the telerik grid. When I put the control on a form or user control it formats the grid really strangely. I haven’t done anything beyond setting the Dock property so it should be set with the default styling’s. I have attached some screen shots showing the problem. The first one is from my project (I attached it to a data source so I can show how the formatting looks), the second is from a brand new project. I did the same thing on each.

    Anyone have any thoughts on what this could be? Maybe something is the project is overwriting the theme? I was also having an issue with the standard grid where it wouldn’t allow users to resize the columns, even though the option was set in the user control and explicitly on the form.

    My goal is ultimately to put it in a user control but I've also tried directly on a form and both produce the same result.  I've tried toggling read only on and off with no luck. I even checked the read only appearance in the working grid and it doesn't look anything like it. Its definitely enabled and I can pull data back and interact with the grid, it just looks funny. It appears to have all the right functionality but it is acting strange when added to the grid or control. In the designer code it is just doing a dim of the instance instead of a friend withevents as in other controls. I am not able to reproduce the issue in a new project so the more I think about it I wonder if there is something in the guts of the program overwriting something. I just don't know where that could be. Any suggestions would be greatly appreciated. Thank you.

  2. David
    David avatar
    5 posts
    Member since:
    Nov 2011

    Posted 28 Mar 2012 Link to this post

    I started playing around with my test project and figured out that it was because the good project referenced the .NET 4.0 version of the controls and the bad project referenced an older version. It still seems weird to me that there is such a drastic difference in appearance between the two versions. We are not able to move to .NET 4.0 at this time so I will engage support to try to address the issue. I wanted to update this post though for anyone who is having a similar problem.
  3. Stefan
    Admin
    Stefan avatar
    2908 posts

    Posted 02 Apr 2012 Link to this post

    Hello David,

    Thank you for writing.

    I can think of two possible reasons for the observed behavior:
    1. If you have created a descendant of RadGridView and you did not override the ThemeClassName method, as described here: http://www.telerik.com/support/kb/winforms/general/inherit-themes-from-radcontrols.aspx.
    2. If there are mixed references in your project. Could you please make sure that all referenced assemblies in your project are with the same version. For example if you have one assembly with version 2012.1.321.20 (which is .NET 2.0 assembly) and another one 2012.1.321.40 (which is .NET 4.0 assembly), such a behavior is possible.

    If none of the suggestions work for you, please provide me with you project, so I can investigate the reasons causing the undesired behavior.

    Kind regards,
    Stefan
    the Telerik team
    RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Back to Top