Here's the layout code for a simple RadGrid I've put in my web page:
The alignment seemed to be working fine until I enabled AutoScrolling. Now, as you can see, the alignment is all messed up.
If you could tell me what to do with the Level and Activity columns then I think I could figure out the others.
Robert
<
telerik:RadGrid
ID
=
"radGridSummary"
runat
=
"server"
AutoGenerateColumns
=
"false"
BorderColor
=
"Gray"
BorderStyle
=
"Solid"
BorderWidth
=
"1"
Width
=
"587px"
CellPadding
=
"0"
GridLines
=
"Both"
Font-Size
=
"11px"
OnItemDataBound
=
"radGridSummary_ItemDataBound"
OnItemCommand
=
"radGridSummary_ItemCommand"
>
<
HeaderStyle
Font-Bold
=
"true"
ForeColor
=
"#031d5b"
VerticalAlign
=
"Middle"
Height
=
"20"
CssClass
=
"pointerOnly headerGridRB"
/>
<
ItemStyle
CssClass
=
"radGridItem"
/>
<
AlternatingItemStyle
CssClass
=
"radGridAltItem"
/>
<
ClientSettings
EnablePostBackOnRowClick
=
"true"
EnableRowHoverStyle
=
"true"
Scrolling-UseStaticHeaders
=
"true"
Scrolling-AllowScroll
=
"true"
Scrolling-ScrollHeight
=
"200px"
/>
<
MasterTableView
BorderWidth
=
"0"
DataKeyNames
=
"TaskID, TaskLevel, TaskActivity"
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"TaskDescription"
HeaderText
=
"Description"
SortExpression
=
"TaskDescription"
>
<
HeaderStyle
HorizontalAlign
=
"Left"
/>
<
ItemStyle
HorizontalAlign
=
"Left"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Level"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
Width
=
"70px"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
<
ItemTemplate
>
<%-- Note: This needs to remain as a Label, as it's accessed by code in 'IndicateRowDeletion' --%>
<
asp:Label
ID
=
"labelLevelName"
runat
=
"server"
Text='<%# GetLevelDescription(Convert.ToInt32(Eval("TaskLevel"))) %>' />
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
<
telerik:GridBoundColumn
DataField
=
"ActivityMajTask"
HeaderText
=
"Activity"
SortExpression
=
"ActivityMajTask"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
/> <%-- Note: Removed Width restriction to allow this one to expand as needed --%>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"TaskStdHours"
HeaderText
=
"Std Hours"
SortExpression
=
"TaskStdHours"
DataFormatString
=
"{0:F2}"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
Width
=
"70px"
/>
<
ItemStyle
HorizontalAlign
=
"Right"
CssClass
=
"indentRight20"
/>
</
telerik:GridBoundColumn
>
<
telerik:GridTemplateColumn
HeaderText
=
"Completed"
>
<
HeaderStyle
HorizontalAlign
=
"Center"
Width
=
"70px"
/>
<
ItemStyle
HorizontalAlign
=
"Center"
/>
<
ItemTemplate
>
<%-- Note: This needs to remain as a Label, as it's accessed by code in 'IndicateRowDeletion' --%>
<
asp:Label
ID
=
"labelCompleted"
runat
=
"server"
Text='<%# Convert.ToBoolean(Eval("TaskStatus")) ? "Yes" : "No" %>' />
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
</
telerik:RadGrid
>
The alignment seemed to be working fine until I enabled AutoScrolling. Now, as you can see, the alignment is all messed up.
If you could tell me what to do with the Level and Activity columns then I think I could figure out the others.
Robert