Hi,
I have durandal dialog and one grid in it. My huge problem is that grid does not want to expand columns in Firefox and IE in localhost (in Chrome it works) and in all browser when I publish project on my server.
I tried to fix this with one simple css rule:
.e-table {
width: 100% !important;
}
But after this, firefox and internet explorer needed 30-60s to render grid, in normal situation it takes 1s. One CSS rule slow down everything, except chrome.
When dialog opens request to the service starts and when service response, I fill data source with the data.
Code is below and attached images shows how it is rendered in browser.
I do not what I am missing here ?
view.html<div class="dialog-container">
<div class="grid-container" data-bind="attr: { id: gridId }, ejGrid: ejGrid"></div>
</div>
viewmodel.html
define(['durandal/system', 'knockout', 'jquery', 'services/service', 'helpers/utils', 'web/ej.button.min', 'web/ej.dropdownlist.min', 'web/ej.maskedit.min', 'web/ej.grid.min', 'common/ej.widget.ko.min'], function (system, ko, $, service, utils) {
var ctor = function () {
};
var selectedRow;
ctor.prototype.getView = function () {
return 'dialogs/searchlookup/view'
}
ctor.prototype.activate = function (settings) {
var self = this;
self.gridId = system.guid().replace(/-/g,"");
function updateGridData() {
service.getData().then(
function (data) {
self.ejGrid.dataSource(data);
},
function (error) {
console.log("Error: " + error);
}
);
}
var gridColumns = utils.getGridColumns();
updateGridData();
var grid = {
dataSource: ko.observableArray([]),
columns: gridColumns,
allowSorting: true,
allowScrolling: true,
scrollSettings: { width: '100%', height: 324 },
rowSelected: function (args) {
selectedRow = args.data;
}
}
self.ejGrid = grid;
};
return ctor;
});
Regards,
Milos
Attachment:
Images_33804c00.zip