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

Column Size in AutoGenerated RadGrid

4 Answers 108 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Karl
Top achievements
Rank 1
Karl asked on 25 Oct 2013, 01:39 PM
Greetings!

I am unable to get a consistent header/column width in my radgrid (see attachment).

The columns are auto generated. After viewing a number of posts, it appears the best practice is to merely set the the HeaderStyle Width, and set the TableLayout to Fixed. And this I have done:

<MasterTableView EditMode="InPlace" CommandItemDisplay="Top" AutoGenerateColumns="True" TableLayout="Fixed">
    <HeaderStyle Width="100px" />

Is there something else I need to do?

Thanks,

Karl

4 Answers, 1 is accepted

Sort by
0
Angel Petrov
Telerik team
answered on 30 Oct 2013, 09:32 AM
Hello Karl,

I have to say that this is not an expected behavior. Could you please show us the markup and code-behind of the page so we can investigate what is causing the misalignment? I tried reproducing the problem in a sample project but to no avail. Please review the test example and tell us what differs in your case. Additionally please ensure that there is no JavaScript error present on the page.

Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Karl
Top achievements
Rank 1
answered on 30 Oct 2013, 08:44 PM
Angel,

By comapring your sample project and process of elimination, I have discovered the cause of the problem to be in the client settings:
<ClientSettings AllowGroupExpandCollapse="false">
    <Scrolling AllowScroll="true" UseStaticHeaders="true" ScrollHeight="400" />
    <ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents>
</ClientSettings>

Setting UseStaticHeaders to false resolves the issue. I have added the client setting to your project, setting static headers to true, and reproduced the problem.

I would prefer to be able to lock our headers in place while scrolling. Do you know of a work around?

Thanks,

Karl
0
Angel Petrov
Telerik team
answered on 04 Nov 2013, 03:49 PM
Hi Karl,

I have included the markup provided in the test sample but was still unable to reproduce the problem as you can see from this video. Could you please elaborate more on which was the browser and browser version used for capturing the screen shot? Additionally could you tell us is the latest version of the controls being used in the application?

If you examine the video carefully you will notice that some of the columns are misaligned by one pixel. This issue has been previously reported and is logged into our system. The scenario from the image however seems completely different and if it is reproducible with the latest version I would like to ask you to open a formal support ticket and attach a runnable sample in which it can be replicated there. That way we will be able to inspect the project locally and try to find what is causing this unwanted behavior.

Regards,
Angel Petrov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Karl
Top achievements
Rank 1
answered on 05 Nov 2013, 03:15 PM
Angel,

I'm using IE 9.0.8112.16421.

The controls are 2013.3.1015.40.

The problem now is mainly academic, as our project that will be rolled into production no longer suffers from this problem thanks to some styling and code behind tricks that are coming out of ticket #752270, which was opened for a different issue but was apparently related.

I've attached another screenshot, showing your provided project with the problem.

Thanks,

Karl

Tags
Grid
Asked by
Karl
Top achievements
Rank 1
Answers by
Angel Petrov
Telerik team
Karl
Top achievements
Rank 1
Share this question
or