webix datatable

Hello webix team,

https://snippet.webix.com/kp0cxr3t

I have stucked in one scenario where I can’t use parse method to bind data to data table. I have to attach the columns dynamically in render method and after binding columns I will have to bind data to columns.

How can I do that?

Hello @Tejal ,

If you want to add columns dynamically and parse the data to these columns, so there is no way to use onAfterRender event. The point is that onAfterRender occurs after the component has been rendered and data parsed.

I recommend you to add columns with the help of webix.toArray($$("grid").config.columns)and insertAt method

Please check the sample: Code Snippet

Hi Nastja,
in version 7.0 Pro Webix.toArray and insertAt are not functions, so we have errors. Are there new functions instead ?
Thanks

Hey @Angelino1990,

in version 7.0 Pro Webix.toArray and insertAt are not functions, so we have errors. Are there new functions instead ?

Unfortunately, there are no replacement functions in the new version, as the API has been completely deprecated. As mentioned in this article talking about deprecated APIs (PowerArray is the name of the API that contained these methods):

PowerArray was used to extend arrays with methods that are available in plain JS arrays. This mixin was necessary for the support of the older versions of IE, and since all newer browsers support JS array methods, we decided to remove PowerArray together with the old IE support.

Basically, it has become obsolete, and the standart JS array methods can do just as much as this mixin.

Please note that you can still get it over at our GitHub and implement it into your code separately.