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

[Solved] Column Grid Allignment

1 Answer 120 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nicholas
Top achievements
Rank 1
Nicholas asked on 20 Jun 2008, 10:04 PM
I just downloaded the trial seeing if our company would like the software or not. 

first thing I did was try out the grid.
The columns do not align with the headers when using UseStaticHeaders="true"
see http://www.donordialogue.com/GridExample.gif

I added the below:
It does the same thing in both firefox, and Internet Explorer. Although firefox it is worse.
Am I doing something wrong?
         <telerik:RadGrid ID="rgDonors"  ShowStatusBar="true" Skin="Outlook" 
            ShowFooter="false" GridLines="Both" AllowSorting="True" AllowPaging="True" PageSize="50" 
             AutoGenerateColumns="false" 
            Width="500px" runat="server"
            <PagerStyle Mode="NumericPages" /> 
            <MasterTableView Width="100%"
            <Columns > 
            <telerik:GridBoundColumn DataField="DonorID" HeaderText="Donor ID" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left" /> 
            <telerik:GridBoundColumn DataField="FirstName" HeaderText="First Name" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/> 
            <telerik:GridBoundColumn DataField="LastName" HeaderText="First Name" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/> 
            <telerik:GridBoundColumn DataField="DateOfBirth" HeaderText="Date Of Birth" DataFormatString="{0:MM/dd/yyyy}" ItemStyle-Width="50" ItemStyle-HorizontalAlign="Left"/> 
            <telerik:GridButtonColumn ButtonType="LinkButton" Text="[Select]" CommandName="Select" ItemStyle-Width="100" ItemStyle-HorizontalAlign="Left"/> 
            </Columns> 
            </MasterTableView>  
 
            <ClientSettings> 
                <Scrolling AllowScroll="True" UseStaticHeaders="True" SaveScrollPosition="True"></Scrolling> 
            </ClientSettings> 
        </telerik:RadGrid> 




1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 23 Jun 2008, 02:27 PM
Hello Nicholas,

Thank you for sending a screenshot and a code snippet. Here are a couple of notes related to your scenario:

1) It is better to use HeaderStyle-Width="..." rather than ItemStyle-Width

2) When using GridLines, you may experience alignment issues with certain skins, such as Outlook. The reason and solution are discussed here:

How to align RadGrid cells when using Scrolling and GridLines


3) You may experience alignment glitches in Internet Explorer when the number of table rows is so small, that the RadGrid's table does not reach the bottom of its allocated space. This is a known issue and will be fixed for some of our next releases.


Let us know if you need further advice.



Kind regards,
Dimo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Nicholas
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or