Devextreme-reactive: Custom CSS Classes on rendered table

Created on 28 Aug 2017  路  4Comments  路  Source: DevExpress/devextreme-reactive

Hey guys,

sorry if this is obvious and I just missed it but I've been looking through the Docs and Demos and unable to find a place where I can declare custom CSS classes that the grid should add to the table HTML element it creates.

This is relevant in for example bootstrap where you may want to use some of the bootstrap built-in table classes such as table-bordered table-striped table-condensed etc.

I tried adding them using the className react decorator on TableView or Grid elements without success.

Any ideas?

Grid enhancement

All 4 comments

Hi,

Thank you for reporting this scenario. This is a very common use case. We have no API for adding custom CSS classes at this moment. We will provide a table customization API in future releases.

In the meantime, we suggest using the following workaround: https://stackblitz.com/edit/react-3kavn7?file=index.js

I've created a separate issue that describes a similar scenario.

You can apply inline CSS in this way :

```jsx


{Children.map(props.children, child =>
cloneElement(child, { style: { minWidth: 'auto' } }))}

)}
/>

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stclairdaniel picture stclairdaniel  路  3Comments

ProjectaJE picture ProjectaJE  路  3Comments

slava-lu picture slava-lu  路  3Comments

SferaDev picture SferaDev  路  3Comments

cavr picture cavr  路  3Comments