Hi Minakshi,
Please mention the patch of MII 14.0 SP04 that you are using.
Now regarding the 2 scenarios:
1. This is an issue, and needs to be fixed. I haven't figured a work around for this.
2. In this case I assume you are calling setDisplayColumns() after draw(<id>)
I tried the same i.e on click of a button I call:
gridObject.getGridObject().setDisplayColumns("DateTime,AssetUtil1,AssetUtil3");
gridObject.refresh();
This worked fine.
However when I tried using setDisplayColumns method before calling draw i.e in the below sequence:
gridObject.getGridObject().setDisplayColumns("DateTime,AssetUtil1,AssetUtil3");
gridObject.draw('div1');
This failed giving js error.
Hope this helps.
Regards,
Ria