Jump to content

Recommended Posts

Posted

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.

Posted
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

Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...