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

Multiple <tbody> elements to define rows

5 Answers 187 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Veteran
Bill asked on 26 Feb 2021, 07:13 PM

Hi there. It looks like the Kendo Grid generates its own tbody element. I have a situation where I'd like to use multiple tbody elements to define a row. W3C says using multiple tbody tags within a table is the correct way to do this. Here is their example: https://www.w3.org/WAI/tutorials/tables/irregular/#table-with-headers-spanning-multiple-rows-or-columns

Is there a way to accomplish this type of thing?

5 Answers, 1 is accepted

Sort by
0
Krissy
Telerik team
answered on 02 Mar 2021, 08:46 AM

Hello Bill,

Thank you for providing the link. 

You can refer to our documentation of the Grid props and see the cellRender and rowRender functions that allow the rows and cells' appearances to be customized: 

https://www.telerik.com/kendo-react-ui/components/grid/api/GridProps/#toc-cellrender 

You can also check out the demo on the page below, it achieves a similar rendering to what is done on the W3C page:
https://www.telerik.com/kendo-react-ui/knowledge-base/merge-row-in-the-grid/ 

This demo shows how the rowSpan property can be used to achieve the visual grouping of the items by the field 'Discontinued'.

Hope this information proves to be useful for your application.

Regards,
Krissy
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Bill
Top achievements
Rank 1
Veteran
answered on 02 Mar 2021, 01:46 PM

Thanks Krissy.

I already have a solution similar to your example. While visually it achieves what I need, there is no semantic grouping and accessibility may suffer.

0
Stefan
Telerik team
answered on 03 Mar 2021, 05:54 AM

Hello, Bill,

Could you please clarify what specifically is needed by to component in order to achieve the required results?

Both the row and the cell render provide full access to rendering each element of the Grid and allow the developer to modify the structure.

Also, we do have a grouping feature that the accessible, the UX is different but it provides a visual groping that is built-in and accessible:

https://www.telerik.com/kendo-react-ui/components/grid/grouping/

 

Regards,
Stefan
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Bill
Top achievements
Rank 1
Veteran
answered on 09 Mar 2021, 11:36 AM

Hi Stefan,

If you look at the W3C recommendation, they use multiple tbody elements which I don't believe is possible.

I am able to get the desired results visually but along with the potential accessibility issues I can't target the group on hover with css.

Thanks for your help.

 

0
Stefan
Telerik team
answered on 10 Mar 2021, 08:13 AM

Hello, Bill,

Thank you for the extra details.

We have discussed this with the entire team and come to the conclusion that this will be a nice new enchantment as a new grouping mode for the Grid.

As we are planning the tasks based on the community interest, please log it here and we will plan it accordingly:

https://feedback.telerik.com/kendo-react-ui

Regards,
Stefan
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
General Discussions
Asked by
Bill
Top achievements
Rank 1
Veteran
Answers by
Krissy
Telerik team
Bill
Top achievements
Rank 1
Veteran
Stefan
Telerik team
Share this question
or