JavaScript UI Libraries & Blazor Components Suite – Smart UI › Forums › Data Grid › Slow Smart-Grid creation
- This topic has 1 reply, 2 voices, and was last updated 3 years, 7 months ago by admin.
-
AuthorPosts
-
March 25, 2021 at 3:29 pm #101673chipsMember
Is it normal for emtpy smart-grid creation to take between 2 and 7 or 8 seconds depending on the device?
eg:
createGrid()
{
Smart(this.domGrid, class
{
get properties()
{
return {
sorting: { enabled: true },
editing: {
enabled: false,
batch: false,
mode: ‘row’
},
filtering: {
enabled: true,
filterMenu: { visible: true }
},
layout: {
rowHeight: 25,
rowMinHeight: 25
},
selection: {
enabled: true,
mode: ‘one’,
allowCellSelection: true,
allowColumnHeaderSelection: false
},
appearance: {
placeholder: “empty”,
showRowLines: false
},
behavior: {
columnResizeMode: ‘growAndShrink’,
allowColumnAutoSizeOnDoubleClick: true
},
dataSource: new Smart.DataAdapter({
dataSource: {},
dataFields: [
‘field1: string’,
‘field2: string’,
‘field3: string’,
‘field4: string’,
‘field5:number’,
‘field6:string’,
‘field7:number’,
‘field8:number’,
]
}),
columns: [
{ label: ‘field1’, dataField: ‘field1’, allowEdit: false },
{ label: ‘field2’, dataField: ‘field2’, allowEdit: true, width: “35%” },
{
label: ‘field3’,
dataField: ‘field3’,
allowEdit: true,
showActionButton: false,
editor: ‘numberInput’,
cellsFormat: ‘F2’,
cellsAlign: ‘right’,
},
{ label: ‘field4’, dataField: ‘field4’, allowEdit: true, showActionButton: false },
{ label: ‘field5’, dataField: ‘field5’, allowEdit: true, showActionButton: false },
{
label: ‘field6’,
dataField: ‘field6’,
allowEdit: true,
showActionButton: false,
cellsAlign: ‘right’,
editor: ‘numberInput’,
cellsFormat: ‘F2’,
formatFunction: function (settings) { if (!settings.value) settings.value = 2 },
validationRules: [{ type: ‘max’, value: 100 }, { type: ‘min’, value: 0 }]
},
{ label: ‘field8’, dataField: ‘field8’, allowEdit: false, width: “10%” }
]
};
}
});March 25, 2021 at 3:46 pm #101674adminKeymasterHi chips,
1-2s is the current loading time of the Grid on desktop. This is for various data sets due to the virtualization the component creates only the necessary HTML elements and reuse them.
Best regards,
Peter Stoev
Smart UI Team
https://www.htmlelements.com/ -
AuthorPosts
- You must be logged in to reply to this topic.