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

Grid Caption positioning

1 Answer 145 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 31 May 2013, 11:04 AM
Hey Guys,

I'm binding a grid to a table (using the kendo-knockout) library and my table has a caption.  Unfortunately when the binding takes place the caption is no longer in the right place.  It stays on the content table thus appearing between the headers and the main table content.

So..
    <table>
        <caption>Caption</caption>
        <thead>...</thead>
        <tbody>...</tbody>
    </table>

Get's rendered as 

Headings
Caption
Data

rather than 

Caption
Headings
Data

as you might expect.

Is there any way to have captions supported.  I can easily overcome this by having my caption above the table in a span or some such but I'd really like to keep my html as semantic as possible.

Chris

1 Answer, 1 is accepted

Sort by
0
Dimiter Madjarov
Telerik team
answered on 31 May 2013, 11:29 AM
Hello Chris,


By default the caption will render under the Headings, because they are actually in a separate table from the one with the content. As a solution I would suggest you to keep the current markup and then use the following script to move the caption above the headings.
E.g.
$("#grid caption").insertBefore(".k-grid-header thead");

I hope that this approach will work in the current scenario.

 

Regards,
Dimiter Madjarov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Chris
Top achievements
Rank 1
Answers by
Dimiter Madjarov
Telerik team
Share this question
or