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

RadGrid injury my asp.net form structure

1 Answer 10 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 16 Dec 2008, 09:41 AM
Hi
I am using radgrid in asp.net form that illustrated in the code below.( i am usin master page.) but after using radgrid in my form the grid display properly but use null space in around area(in horizontal) . i am enable scrolling. please hep me.

<

 

asp:UpdatePanel ID="UpdatePanel10" runat="server" UpdateMode="Always" ChildrenAsTriggers="true">

 

 

<ContentTemplate>

 

 

<div style="margin-top: 24px; margin-bottom: 30px">

 

 

<asp:Panel ID="TotalPan" runat="server" BorderColor="#D8DAD8" BorderStyle="None"

 

 

BorderWidth="1px" ScrollBars="None" Width="700px" Height="400px" BackColor="#FFFFFF"

 

 

Direction="RightToLeft" HorizontalAlign="Right">

 

 

<telerik:RadGrid ID="RadGrid1" runat="server" AllowSorting="True" Font-Names="Tahoma"

 

 

Font-Size="9pt" GridLines="None" Height="100%" Skin="Hay" Width="100%" AutoGenerateColumns="False"

 

 

ActiveItemStyle-HorizontalAlign="Center" AlternatingItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-HorizontalAlign="Center" HorizontalAlign="Center" MasterTableView-Dir="RTL"

 

 

ShowFooter="True">

 

 

<AlternatingItemStyle HorizontalAlign="Center" />

 

 

<MasterTableView Dir="RTL" Font-Names="Tahoma" DataKeyNames="KeyValue" Width="100%">

 

 

<RowIndicatorColumn Visible="true">

 

 

<HeaderStyle Width="20px" />

 

 

</RowIndicatorColumn>

 

 

<ExpandCollapseColumn Resizable="False" Visible="False">

 

 

<HeaderStyle Width="20px" />

 

 

</ExpandCollapseColumn>

 

 

<EditFormSettings>

 

 

<PopUpSettings ScrollBars="None" />

 

 

</EditFormSettings>

 

 

<Columns>

 

 

<telerik:GridBoundColumn DataField="RowNumber" HeaderText="©§ïه" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="50px" HeaderStyle-HorizontalAlign="Center" SortExpression="RowNumber">

 

 

<HeaderStyle HorizontalAlign="Center" Width="50px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="50px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="TaskType" HeaderText="ëيم همںéï¢" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Right"

 

 

HeaderStyle-Width="150px" HeaderStyle-HorizontalAlign="Center" SortExpression="TaskType">

 

 

<HeaderStyle HorizontalAlign="Center" Width="150px" />

 

 

<ItemStyle HorizontalAlign="Right" Width="150px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="ConID" HeaderText="¬êں©ى ç©ں©§ں§" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="140px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="14px" HeaderStyle-HorizontalAlign="Center" SortExpression="ConID">

 

 

<HeaderStyle HorizontalAlign="Center" Width="14px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="140px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="PermitNumber" HeaderText="¬êں©ى ê¤يھ" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="100px" HeaderStyle-HorizontalAlign="Center" SortExpression="PermitNumber">

 

 

<HeaderStyle HorizontalAlign="Center" Width="100px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="100px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="_Name" HeaderText="ëںê همںéï¢" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="300px" ItemStyle-HorizontalAlign="Right"

 

 

HeaderStyle-Width="300px" HeaderStyle-HorizontalAlign="Center" SortExpression="_Name">

 

 

<HeaderStyle HorizontalAlign="Center" Width="300px" />

 

 

<ItemStyle HorizontalAlign="Right" Width="300px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Wbs" HeaderText="ک§ Wbs" Resizable="true" Reorderable="true"

 

 

ShowSortIcon="true" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="80px" HeaderStyle-HorizontalAlign="Center" SortExpression="Wbs">

 

 

<HeaderStyle HorizontalAlign="Center" Width="80px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="80px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="BaseLineStart" HeaderText="ê¤يھ ںھ ¢ں©ï¦" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="120px" HeaderStyle-HorizontalAlign="Center" SortExpression="BaseLineStart">

 

 

<HeaderStyle HorizontalAlign="Center" Width="120px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="120px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="BaseLineFinish" HeaderText="ê¤يھ ¢ں ¢ں©ï¦" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="120px" HeaderStyle-HorizontalAlign="Center" SortExpression="BaseLineFinish">

 

 

<HeaderStyle HorizontalAlign="Center" Width="120px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="120px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="ActualStart" HeaderText="ں¤©ں ںھ ¢ں©ï¦" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="120px" HeaderStyle-HorizontalAlign="Center" SortExpression="ActualStart">

 

 

<HeaderStyle HorizontalAlign="Center" Width="120px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="120px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="ActualFinish" HeaderText="ں¤©ں ¢ں ¢ں©ï¦" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="120px" HeaderStyle-HorizontalAlign="Center" SortExpression="ActualFinish">

 

 

<HeaderStyle HorizontalAlign="Center" Width="120px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="120px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="CircuitTitle" HeaderText="مëيںë ê§ں©" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="200px" HeaderStyle-HorizontalAlign="Center" SortExpression="CircuitTitle">

 

 

<HeaderStyle HorizontalAlign="Center" Width="200px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="200px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="CircuitCodes" HeaderText="ک§ ه里/ê§ں©" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="100px" HeaderStyle-HorizontalAlign="Center" SortExpression="CircuitCodes">

 

 

<HeaderStyle HorizontalAlign="Center" Width="100px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="100px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="TaskDes" HeaderText="¬©¥ همںéï¢" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="300px" ItemStyle-HorizontalAlign="Right"

 

 

HeaderStyle-Width="300px" HeaderStyle-HorizontalAlign="Center" SortExpression="TaskDes">

 

 

<HeaderStyle HorizontalAlign="Center" Width="300px" />

 

 

<ItemStyle HorizontalAlign="Right" Width="300px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="IsUnderTansion" HeaderText=" ©ç§ں©" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="50px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="50px" HeaderStyle-HorizontalAlign="Center" SortExpression="IsUnderTansion">

 

 

<HeaderStyle HorizontalAlign="Center" Width="50px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="50px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="HeaderName" HeaderText="ê«‍يé گ©يى" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="160px" HeaderStyle-Width="160px"

 

 

HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center" SortExpression="HeaderName">

 

 

<HeaderStyle HorizontalAlign="Center" Width="160px" />

 

 

<ItemStyle Width="160px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="RegType" HeaderText="ëيم £ ¢" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="70px" HeaderStyle-HorizontalAlign="Center" SortExpression="RegType">

 

 

<HeaderStyle HorizontalAlign="Center" Width="70px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="70px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="Impstate" HeaderText="يàمï¢ کں©" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="120px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="120px" HeaderStyle-HorizontalAlign="Center" SortExpression="Impstate">

 

 

<HeaderStyle HorizontalAlign="Center" Width="120px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="120px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="PercentComplete" HeaderText="§©­§ پ﬩ه¢" Resizable="true"

 

 

Reorderable="true" ShowSortIcon="true" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center"

 

 

HeaderStyle-Width="80px" HeaderStyle-HorizontalAlign="Center" SortExpression="PercentComplete">

 

 

<HeaderStyle HorizontalAlign="Center" Width="80px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="80px" />

 

 

</telerik:GridBoundColumn>

 

 

<telerik:GridBoundColumn DataField="NotImpReason" HeaderText="§éںïé éني/م§ê ں¤©ں"

 

 

Resizable="true" Reorderable="true" ShowSortIcon="true" ItemStyle-Width="150px"

 

 

ItemStyle-HorizontalAlign="Center" HeaderStyle-Width="150px" HeaderStyle-HorizontalAlign="Center"

 

 

SortExpression="NotImpReason">

 

 

<HeaderStyle HorizontalAlign="Center" Width="150px" />

 

 

<ItemStyle HorizontalAlign="Center" Width="150px" />

 

 

</telerik:GridBoundColumn>

 

 

</Columns>

 

 

</MasterTableView>

 

 

<HeaderStyle HorizontalAlign="Center" />

 

 

<ClientSettings AllowColumnsReorder="True" ReorderColumnsOnClient="True">

 

 

<Scrolling AllowScroll="True" UseStaticHeaders="true" SaveScrollPosition="true" />

 

 

<Selecting AllowRowSelect="true" />

 

 

<Resizing AllowColumnResize="true" />

 

 

</ClientSettings>

 

 

<ActiveItemStyle HorizontalAlign="Center" />

 

 

</telerik:RadGrid>

 

 

</asp:Panel>

 

 

</div>

 

 

</ContentTemplate>

 

 

</asp:UpdatePanel>

 

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 19 Dec 2008, 10:08 AM
Hello Frank,

This issue is caused because of an IE rendering bug. To avoid the problem please do not set grid's HorizontalAlign property. To attain the functionality you are searching for I would suggest that you use margin style set to "0 auto" for the inner div.
Here is a code snippet describing the suggestion:
<div> 
    <div style="margin:0 auto"
      <%--The grid should be placed here--%> 
    </div> 
</div> 
I have to note that if you want the inner div  to be centered into outer div, the other grid should be bigger than inner div.
 The other workaround that we found is to set ScrollHeight with same value of Panel's height.
Here is a code snippet of the workaround:
<ClientSettings > 
    <Scrolling ScrollHeight="400px"/> 
...... 
</ClientSettings > 

I hope this helps.

All the best,
Georgi Krustev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Frank
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or