Is possible I create datatable inside list like this: Pasteboard - Uploaded Image
or how to add datatable in template list ?
if no possible create datatable with list subview
https://docs.webix.com/samples/60_pro/01_datatable/07_sub/04_sub_grid.html
here is my try snippet Code Snippet
- You can embed datatable into the fieldset component.
- SubView is a feature of the datatable. Instead of ui.list, you can use a list-like datatable without a header.
Please check the following sample: https://webix.com/snippet/7e276c4f
How can I add footer parse by parent json data, I try create like below still not working
https://webix.com/snippet/ca4d43d9
Hello,
You need to access the inner datatable and template in the onSubViewCreate
handler and parse the desired data to them separately using their API:
onSubViewCreate: function(view, item) {
/* view is the form */
var grid = view.getChildViews()[0];
var template = view.getChildViews()[1];
grid.parse(item.outlets);
template.data.total_votes = item.total_votes;
template.refresh();
}
Check the following snippet, please: https://webix.com/snippet/efe5b17d
I set autoConfig column and add cell style using $cellCss https://docs.webix.com/datatable__styling.html#cells, there is stil issue $cellCss json data is showing in last column
How can I remove last $cellCss column working in datatable autoConfig is true ?
https://webix.com/snippet/f987624e
and how I add footer: {content: ‘summColumn’} in autoConfig column ?
Thanks
Hello,
Yep, I can confirm the issue with $cellCss (as well as other $-properties like $css and $height) for auto generated columns. We will fix it in the next version, while for now you can remove this column in the onStructureLoad
handler.
In the same handler you can add the total counter to all the necessary columns:
onStructureLoad:function(){
//remove $cellCss
this.config.columns.pop();
//add summColumn for the needed columns
for(var i = 1; i<this.config.columns.length; i++){
this.config.columns[i].footer = {content: 'summColumn'};
}
}