Hello,
is it possible to customize the Attribute Table in Web AppBuilder App based on attribute of features? What I need is change color of the row if some attribute has error state.
Thanks a lot
Regards
Zdenek
Solved! Go to Solution.
Robert,
thank you again. I have one more problem with automatic refreshing of the AttTable.
I have a next widget which ask for data every minute. When the AttTable is opened I would like to automatic refresh it everytime when the request is called.
I tried an approach with communication between widgets but unsuccessfully.
Was it a good approach?
just get a reference to the AT widget and call refresh inside the code/widget that is doing the data update every minute.
Hi Robert,
the things you do are very interesting and useful. I am trying to highlight row in where the Field Name is "Asset type" , when I put the code :
aspect.around(this.grid, "renderRow", function(original) {
return function(object) {
var row = original.apply(this, arguments);
if(object.Asset_ === 'Manhole'){
html.addClass(row, 'redRow');
}
return row;
};
});
it does not highlight the cell for me, also I have pasted the html code you said to put in the style.css
Also this is a relationship layer
can you please help in this if I am doing something wrong.
Thank you so much! It has matched with my result. That I want to do.
And can also render column also. Please let me know.
The location is "[install dir]\server\apps\[app#]\widgets\AttributeTable\table\_FeatureTable.js" and the createTable function.
Thanks, It's worked. Can we render the particular cell instead of row. Please guide me if you know how to do it.
To do an individual cell then this code would apply.
aspect.around(this.grid, "renderRow", function(original) {
return function(object) {
var row = original.apply(this, arguments);
if(object.Desc_ === 'Arson'){
var cells = query('.field-Desc_', row);
html.addClass(cells[cells.length -1], 'redRow');
}
return row;
};
});
Many Many Thanks @Robert!
Getting error in below line code:
var cells = query('.field-Desc_', row);
so you understand that you have to modify that line to match the field you are searching for right?
var cells = query('.field-YOURFIELDNAME', row);