I am having a problem I cannot seem to reproduce on my computer, but it persists on my manager’s computer.
The problem occurs in the Internet Explorer 11 (IE11) when column is supposed to be hidden, but instead it is showing in the grid.
I am not sure if my initialisation is wrong and if I understand things correctly like am I supposed to set hidden column attributes or not?
At the moment I am using standard DHTMLX suite and in one of my pages I initialise DataGrid with the following code:
var dGrid; // Set globaly
var jsonAvailableUsers; // Global array of JS objects obtained via Ajax call and parsed with JSON.parse
// inside the init function:
function initDGrid()
{
dGrid = new dhtmlXGridObject('UserGridContainer');
dGrid.setImagePath("dhtmlx/imgs/");
dGrid.setHeader("User,Assign,UserID", null, ["text-align:left;font-size:11px;","text-align:center;font-size:11px;"]);
dGrid.setInitWidths("*,50,*");
dGrid.setColAlign("left,center,left");
dGrid.setSkin("dhx_skyblue");
dGrid.setColSorting("str,str,str");
dGrid.setColTypes("ro,ch,ro");
dGrid.setColumnHidden(2, true);
dGrid.init();
dGrid.makeFilter("searchFilterField", 0);
dGrid.parse(jsonAvailableUsers, "json"); // jsonAvailableUsers - data obtained via web service using Ajax request
dGrid.attachEvent("onRowSelect", function(rowID, cellInd)
{
});
dGrid.attachEvent("onCheckbox", function(rowID, cellInd, state)
{
saveData(dGrid.cells(rowID, 2).getValue(), state); // Get UserID (hidden column) to pass as parameter
});
}
Aside of the initialisation code, once the data changes (add/delete/update) to reflect the data changes I am using the following code to reload the data inside the grid:
function updateDGrid()
{
dGrid.clearAll();
dGrid.parse(jsonAvailableUsers, "json");
dGrid.refresh();
}
Could you please advise me if my code is used correctly to initialise and refresh the DataGrid, or what would be the better way to handle this if this is not the proper way…
Also, would you know what could cause the column to be showing (NOTE: the column being set as hidden when displayed in IE it is displayed with default style applied to it (e.g. font size 12) while rest of the columns are showing in set style (e.g. font size 11)
Please help.
Thank you in advance!