Unplanned
Last Updated: 02 Jul 2024 08:51 by Alex
Oleksandr
Created on: 07 Feb 2022 11:08
Category: KendoReact
Type: Feature Request
2
Add showBorders and alternatingRows properties for Grid

I'd like to turn off even/odd row highlighting for the Grid and use cell border instead.

I can do it by learning kendo css classes and override particular properties for certain classes but... I have many different vendors for different components and it's so a pitty to learn all the css classes hell...

It'd be supper cool to have something like turnOffAlternation/alternatingRows and showCellBorder/showBorders  attributes on the Grid.

2 comments
Alex
Posted on: 02 Jul 2024 08:51
That would be a nice feature, because the workaround with the CSS patch seems to be difficult when using themes.
ADMIN
Konstantin Dikov
Posted on: 07 Feb 2022 11:12

Just wanted to post the current solution for adding borders and removing the alt rows:

1) Removing alt rows can be easily achieving by handling the rowRender event and removing the added class:

const rowRender = (trElement, props) => {
  const trProps = {
    className: trElement.props.className.replace('k-alt', ''),
  };
  return React.cloneElement(
    trElement,
    { ...trProps },
    trElement.props.children
  );
};

Adding the borders could be achieved with the following CSS:

            <style>
            .k-grid table .k-master-row td{
                border-bottom: 1px solid #888;
            }

As for the requested properties, we will monitor the interest in the feature request.

 

Regards,
Konstantin Dikov
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/.