Skip to content

Commit 478056a

Browse files
github-actions[bot]KB Bot
and
KB Bot
authored
Added new kb article radgrid-caption-bottom-to-top (#666)
Co-authored-by: KB Bot <[email protected]>
1 parent 3f5d063 commit 478056a

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: Caption Displays at Bottom of RadGrid Instead of Top
3+
description: Learn how to adjust the position of the caption in RadGrid for ASP.NET AJAX to appear at the top instead of the bottom.
4+
type: troubleshooting
5+
page_title: How to Move RadGrid Caption to the Top in ASP.NET AJAX
6+
slug: radgrid-caption-bottom-to-top
7+
tags: radgrid, asp.net ajax, caption, css
8+
res_type: kb
9+
ticketid: 1681277
10+
---
11+
12+
## Environment
13+
<table>
14+
<tbody>
15+
<tr>
16+
<td>Product</td>
17+
<td>RadGrid for ASP.NET AJAX</td>
18+
</tr>
19+
</tbody>
20+
</table>
21+
22+
## Description
23+
When adding a caption to the MasterTableView in RadGrid for ASP.NET AJAX, the caption is displayed at the bottom of the grid instead of the top. This article explains how to correct the caption's position.
24+
25+
## Cause
26+
The issue might be caused by CSS styles affecting the caption's position or an incorrect HTML structure. Additionally, JavaScript code might interfere and alter the caption's position after the page has loaded.
27+
28+
## Solution
29+
To ensure the caption appears at the top of RadGrid, follow these steps:
30+
31+
1. **Check CSS Styles**: Ensure no CSS styles are positioning the caption incorrectly. Inspect the grid and caption for any applied styles that may affect its position.
32+
33+
2. **Set Caption Position via CSS**: Explicitly set the caption's position using CSS. Add the following CSS rule to your stylesheet to position the caption at the top of RadGrid:
34+
35+
```css
36+
.rgMasterTable .rgCaption {
37+
caption-side: top;
38+
}
39+
```
40+
41+
This CSS rule targets the caption within RadGrid and sets its position to the top.
42+
43+
3. **Inspect HTML Structure**: Verify the caption is correctly placed within the `<table>` element in the HTML markup. It should be directly inside the `<table>` tag, before any `<thead>`, `<tbody>`, or `<tfoot>` elements.
44+
45+
4. **Check for JavaScript Interference**: Ensure no JavaScript functions or scripts are manipulating the caption's position after the page loads.
46+
47+
By following these steps, the caption should appear at the top of RadGrid, as expected.
48+
49+
## See Also
50+
- [RadGrid Overview](https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/overview)

0 commit comments

Comments
 (0)