on 06-02-2011 10:57 AM
Hi experts,
I'm trying to set dynamically igrid columns in java script:
document.DetailGrid.getQueryObject().setColumns("DateTime");
But it says there is not such method for QueryObject.
Is there anybody who knows right method?
Thank you..
-Ekrem
It is a Grid object, so the methods you need would be:
document.DetailGrid.getGridObject().setColumns("DateTime");
If you are working in MII 12.1, open the webpage in the Workbench. At the center of the bottom of the editing screen there are 5 dots. Click, hold, and drag up to open Script Assistant. It will help with the actual syntax you need.
Regards,
Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Looks like there is only setColumnHeaders for the GridObject.
The one way I know will work, but generally don't recommend it is to:
...getQueryObject().setQuery("Select ColumnA, ColumnB,... from TableOrViewA")
But I think you will see a bit of a performance hit. If you are selecting between only two or three layouts, you could change the Display Template object of the Grid Applet (or depending on your design, you could change both the query and display templates). That would have less impact and would be easier to maintain.
Regards,
Mike
document.iGrid.getGridObject().setDisplayColumns("A,B,C")
This method will force the grid to only show the columns you provide (of course they must be returned in the query results). If the query returns additional columns they will not be visible unless you use the right click menu and request the data details.
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.