sveins12
Aug 14, 2016, 8:55 PM
I'm loading data into the store in a delayed function. The grid-layout gets messed up, and only the upper-half part of each row is showing (see picture attached below the code):
@{
var x = Html.X();
}
@(
x.Grid()
.Columns(
x.Column()
.DataIndex("Name")
.Text("Name")
.Flex(1)
)
.Store(x.Store())
.Listeners(l => l.Initialize.Handler= @"
//Using setTimeout to make a delay and simulate that the data comes later in the workflow.
setTimeout(function(){
var data = [];
for(var i=0; i<1000; i++)
data.push({Name:'Name'+i, });
item.getStore().loadData(data);
},200);
// I have tried item.refresh() here, but it doesn't help.
")
)
This is how it looks:
24716
@{
var x = Html.X();
}
@(
x.Grid()
.Columns(
x.Column()
.DataIndex("Name")
.Text("Name")
.Flex(1)
)
.Store(x.Store())
.Listeners(l => l.Initialize.Handler= @"
//Using setTimeout to make a delay and simulate that the data comes later in the workflow.
setTimeout(function(){
var data = [];
for(var i=0; i<1000; i++)
data.push({Name:'Name'+i, });
item.getStore().loadData(data);
},200);
// I have tried item.refresh() here, but it doesn't help.
")
)
This is how it looks:
24716