on 2018 Dec 17 8:33 PM
when the page loads am trying to get the number of rows in the i5Grid but am not sure why it shows 0 row count. The only time where I could see the row count is when the i5Grid is selected.
Below is the sample code:
var grid_c0c0 = new com.sap.xmii.grid.init.i5Grid("grid template path","query templ path",true);
grid_c0c0.registerCreationEventHandler(ceController.addObject("c0c0",grid_c0c0));
grid_c0c0.draw("gridc0c0");
alert("initial"+grid_c0c0.getGridObject().getRowCount());
I couldn't figure out what is the issue. Any help would be Appreciated.
Thanks
Sap
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
I guess there is some race condition going on in the bowels of the objects. FWIW it only seems to be happening with the first update event. the regular update event doesn't seem to have the issue.
On a hunch I wrapped the draw call in a promise and it seems to be working.
$.when(i5Grid_Applet.draw("myDiv")).done(function(){
var count = i5Grid_Applet.getGridObject().getRowCount();
alert(count);
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
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.