How to customize the FeatureTable

2544
9
Jump to solution
03-18-2021 09:36 AM
ShaningYu
Frequent Contributor

I use ESRI's FeatureTable widget (4.x)  

https://developers.arcgis.com/javascript/latest/sample-code/widgets-featuretable-map/

I want to customize it somehow.  On the Grid's top-right the ... represents the "Options".  How can it be set off?

Thanks.

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
KenBuja
MVP Esteemed Contributor

Adding this to the CSS will remove the button

.esri-feature-table__menu .esri-button-menu {
  display: none;
}

View solution in original post

9 Replies
KenBuja
MVP Esteemed Contributor

Adding this to the CSS will remove the button

.esri-feature-table__menu .esri-button-menu {
  display: none;
}
LefterisKoumis
Occasional Contributor III

Hello @KenBuja . Where can see all available css properties for the feature table or all esri widgets? Thank you.

0 Kudos
KenBuja
MVP Esteemed Contributor

The widget pages should have a link to the css information in the See Also section

css.png

You can also right click on the widget and use the Inspect option to get more information about all of its CSS.

LefterisKoumis
Occasional Contributor III

Thank you @KenBuja . I am surprised that there is no css to change background color of rows. Only when you hover over it or select it.

0 Kudos
ShaningYu
Frequent Contributor

Thanks for your response.  In my app, I created a dynamic table as shown below:

contx.myTable = new mv.esriModules.FeatureTable({
layer: contx.myFeatureLayer,
visibleElements: { selectionColumn: false },
fieldConfigs: _fieldsConfig,
container: document.getElementById("tableDiv")
});

How can the style be added dynamically?  Thanks.

0 Kudos
KenBuja
MVP Esteemed Contributor

If you don't want to add it to the CSS style section in your html, you can add it dynamically several different ways: https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Using_dynamic_styling_information

ShaningYu
Frequent Contributor

KenBuja:  Resolved.  Thanks a lot!

0 Kudos
MarioEstevez
New Contributor III

ShaningYu,

Could you share your solution? I have a similar problem. I'm trying to change the background color of a cell based on the value on another cell.

Thanks!

 

0 Kudos
KenBuja
MVP Esteemed Contributor

Glad to help. Don't forget to click the Accept as Solution button or post how you resolved it.

0 Kudos