codeb Posted February 5, 2014 Posted February 5, 2014 Hi! I try to fast clean UniStringGrid with first fixed row, but with out success... Any advice ... Quote
ZigZig Posted February 5, 2014 Posted February 5, 2014 Hi, uniStringGrid is not the most optimized component of uniGUI... Anyway, you can try this : set uniStringGrid.Visible to false before clearing it (or before adding lines), and set it to True after your process try to set the property "DoubleBuffered" to True before clearing it (or adding lines) try to use methods "BeginUpdate" and "EndUpdate" when you change something in your StringGrid. You should notice better performances (but not so good; uniStringGrid is still a crappy component). You can also try to use uniDBGrid instead of uniStringGrid... performances are better in some cases. Quote
Sherzod Posted February 6, 2014 Posted February 6, 2014 Hi codeb. If you need complete cleaning UniStringGrid, think can use store.reload (); for example: Try uses ... uniGUIApplication ... ; UniSession.AddJS(UniStringGrid1.JSName + '.store.reload();'); Best regards Quote
ZigZig Posted February 8, 2014 Posted February 8, 2014 Hi codeb, I think I found a nice solution : BEFORE clearing your uniStringGrid, put this line in your code : UniSession.JSCode(myUniStringGrid.JSName+'.store.suspendEvents();'); AFTER clearing your uniStringGrid, put the lines: UniSession.JSCode(myUniStringGrid.JSName+'.store.resumeEvents();'); UniSession.JSCode(myUniStringGrid.JSName+'.view.refresh();'); By the way, if some of your operations are too slow (ie creating components in runtime), you can do this : BEFORE your slow operation UniSession.JSCode('Ext.suspendLayouts();'); AFTER your slow operation UniSession.JSCode('Ext.resumeLayouts(true);'); Everything is fully explained here : http://edspencer.net/2013/07/19/sencha-con-2013-ext-js-performance-tips/ Hope it'll help you. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.