AnsweredAssumed Answered

OnDemandGrid row height question - sometimes truncates my data

Question asked by schlot on Sep 28, 2015
Latest reply on Sep 30, 2015 by schlot

I have an OnDemandGrid which is getting populated from the attributes of the graphics in a featureLayer.  It's based on Select with Feature Layer | ArcGIS API for JavaScript  but I wanted to use county polygons and include as an output attribute a list of counties that the buffer overlaps.


I have my buffer generated and a list of the counties, along with summary statistics,  but I can't get the style of the row right.  I tried both a hard coded height on .dgrid-row as well as setting this to height: auto.


.dgrid-row {
height: 100px;


Sometimes the list of names wraps and looks OK and other times it chops them off. The length of the list of county names will vary and I'd rather have it automatically resize as needed, rather than hard coding a specific height.  I have a ColumnResizer on this,so at least the user can stretch out the field to see all the contents, but I'd like to manage it with a style setting if I can.    I see there an autoHeight: true on the grid, but that seems to be for the entire grid and not individual rows within it.


I read this, which was helpful, but nothing I tried gives me the results I want:

| CSS Styling of dgrid | Blog | SitePen


It looks like it word wraps when the county name is two words, but just truncates it mid-word if it's not