attachGrid like new dhtmlXGridObject with object init

A new grid can be initialized using a json object as shown in your example:

The concept of using a JSON object works for most components when creating a new object, as well as attaching one, in the same way. I like how the code reads; it is clean.

The above method used for new dhtmlXGridObject() does work for the new grid, but not for the attachGrid() method.

I looked in the dhtmlxgrid.js file, which confirmed this.

This would be a nice feature to have in the future :slight_smile:

You’re right. Unfortunately such initialization is not available for the attachGrid method.
Thank you for your suggestion it will be reviewed in the future.