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

GridView Appearance Problem

2 Answers 107 Views
GridView
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 28 Mar 2012, 01:44 PM

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 Answers, 1 is accepted

Sort by
0
David
Top achievements
Rank 1
answered on 28 Mar 2012, 02:00 PM
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.
0
Stefan
Telerik team
answered on 02 Apr 2012, 08:50 AM
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 >>
Tags
GridView
Asked by
David
Top achievements
Rank 1
Answers by
David
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or