Caption in wrong location

1 Answer 13 Views
Grid
Wayne
Top achievements
Rank 1
Iron
Wayne asked on 10 Mar 2025, 10:28 AM
I have been having this issue for a few days.  When I add a caption to the MasterTableView, it is always being displayed at the bottom of the grid, never at the top.  Is this normal, and can I change this somehow?  

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 10 Mar 2025, 02:58 PM

Hi Wayne,

The behavior you're experiencing, where the caption appears at the bottom of the grid, is not typical. By default, the caption should appear at the top of the table. Here are some steps you can take to address this issue:

  • Check CSS Styles: Ensure there are no CSS styles affecting the position of the caption. Look for any styles applied to the grid or caption that might be positioning it incorrectly.

  • Set Caption Position via CSS: You can explicitly set the position of the caption using CSS. Here's a simple example to ensure the caption is displayed at the top:

    <style>
        .rgMasterTable .rgCaption {
            caption-side: top;
        }
    </style>
    

    This CSS rule sets the caption to be displayed at the top of the table.

  • Inspect HTML Structure: Verify that 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.

  • Check for JavaScript Interference: Ensure there are no JavaScript functions or scripts that might be manipulating the position of the caption after the page loads.

If these suggestions do not resolve the issue, please provide additional details about your setup, such as the version of Telerik UI for ASP.NET AJAX you are using, and any custom scripts or styles applied. This will help in providing a more tailored solution. Also, share the CSS, aspx and its codebehind files for review.

 

    Regards,
    Rumen
    Progress Telerik

    Enjoyed our products? Share your experience on G2 and receive a $25 Amazon gift card for a limited time!

    Wayne
    Top achievements
    Rank 1
    Iron
    commented on 10 Mar 2025, 03:18 PM

    That worked.  I dropped that code into my css, and called it from the CssClass..... it is finally on the top where it belongs.

    Thank you very much

    Tags
    Grid
    Asked by
    Wayne
    Top achievements
    Rank 1
    Iron
    Answers by
    Rumen
    Telerik team
    Share this question
    or