DataView item width set to 100%


#1

I’m try to set dataview items full width of component. Here are template:

  certView.define(
    "type", {
      template : "<div style='background-image: url( #uriorig# );background-size: cover; width:100%; height: 250px;'>#title#</div>",
      height : 160
  });

But it not follow width: 100% size css. How to do it? Should it be done by css or other DHTMLx methods?
Also it be good to known how to set exactly 50%, 33% for columns.


#2

Please, try to use the “autowidth” property.
Refer to the following sample:
https://dhtmlx.com/docs/products/dhtmlxDataView/samples/01_initialization/08_auto_width.html


#3

Thanks, it’s working now! I can even make it responsive, by defining columns count for different screens.
I done try calculate width by javascript - depending on container size, but not read all the documentation, autowidth described in “Object constructor” chapter of documentation of dataview.