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

Grid column and data column alignment is distrubing

3 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dilip
Top achievements
Rank 1
Dilip asked on 08 Mar 2011, 10:14 AM
Hello,

I am regular using telerik controls. I implemented the advance feature in my project in one grid, now gird column alignemtn got distruct, please can you give me suggetion for this. for you reference I sending you some codes and output screen, you can see in screen column heading anddata both alignemnt is not good. So  please can you help me in this. I will say thank in advance
   
<telerik:RadGrid ID="radGridInbox" runat="server" AutoGenerateColumns="false" OnItemDataBound="radGridInbox_ItemDataBound"
                                        GridLines="Horizontal" AllowPaging="true" PageSize="25" OnNeedDataSource="radGridInbox_NeedDataSource"
                                        OnPageIndexChanged="radGridInbox_PageIndexChanged" OnPageSizeChanged="radGridInbox_PageSizeChanged"
                                        Width="100%" CellPadding="0" CellSpacing="0" EnableHeaderContextFilterMenu="true"
                                        EnableHeaderContextMenu="true" BorderWidth="0" EnableAjaxSkinRendering="true"
                                        AllowFilteringByColumn="false" AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
                                        <GroupingSettings CaseSensitive="false" />
                                        <HeaderContextMenu EnableAutoScroll="True" />
                                        <MasterTableView AutoGenerateColumns="false" Width="100%" CommandItemDisplay="Top" PagerStyle-AlwaysVisible="true" DataKeyNames="UserMessageId,UserId,MessageState"
                                            AllowSorting="true" AllowFilteringByColumn="false" FilterItemStyle-HorizontalAlign="Left"
                                            HorizontalAlign="NotSet"EditMode="PopUp" CellPadding="0"
                                            CellSpacing="0" IsFilterItemExpanded="false" GridLines="None" TableLayout="Auto"
                                            BorderWidth="0" EnableHeaderContextMenu="true" EnableHeaderContextFilterMenu="true">
                                            <CommandItemSettings RefreshText="Refresh List" />
                                            <PagerStyle AlwaysVisible="true" Mode="NextPrevNumericAndAdvanced" Position="Bottom" />
                                            <Columns>
                                                <telerik:GridDateTimeColumn DataFormatString="{0:MM/dd/yyyy}" ItemStyle-HorizontalAlign="Left"
                                                    HeaderText="Date" DataField="DeliverOnDate">
                                                    <HeaderStyle HorizontalAlign="Left" Width="8%"></HeaderStyle>
                                                    <ItemStyle HorizontalAlign="Left" Width="8%"></ItemStyle>
                                                </telerik:GridDateTimeColumn>
                                                <telerik:GridBoundColumn ItemStyle-HorizontalAlign="Left" HeaderText="From" DataField="FromUserName">
                                                    <HeaderStyle HorizontalAlign="Left" Width="16%"></HeaderStyle>
                                                    <ItemStyle HorizontalAlign="Left" Width="16%"></ItemStyle>
                                                </telerik:GridBoundColumn> 

Thanks and Regards,
Dilip Kumar

3 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 11 Mar 2011, 10:56 AM
Hello Dilip,

Please remove all ItemStyle-Width declarations. If you need to set the width of your columns, please use the HeaderStyle-Width property instead.

Regards,
Daniel
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Dilip
Top achievements
Rank 1
answered on 11 Mar 2011, 01:19 PM
Hello Daniel,

Now some how ok button some getting struck, this  sentence (Please remove all ItemStyle-Width declarations. If you need to set the width of your columns, please use the HeaderStyle-Width property instead) not getting resolved full can you please let me know any other solution

Regards,
Dilip Kumar

0
Daniel
Telerik team
answered on 16 Mar 2011, 06:08 PM
Hello Dilip,

Please download the attached demo and let me know how to reproduce the problem on my end. This way I will be able to provide straight-to-the-point solution.

Regards,
Daniel
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Tags
Grid
Asked by
Dilip
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Dilip
Top achievements
Rank 1
Share this question
or