Page 1 of 1

Datagrid column hide/show delay

Posted: Mon May 06, 2019 11:05 pm
by cpuandnet
Does anyone have a better solution for hiding/showing datagrid columns? I'm using the code below in a command script that is called from the stackResize message. However, there is a noticeable delay before the columns are hidden or shown. It happens whether there is one line of data set using dgText or using the GetDataForLine method.

Thank you in advance for any help.

Code: Select all

   put the width of this card into tCardWidth
   set the lockScreen to true
   if tCardWidth >= 1280 then
      set the dgProp["column visibility"] of group "myDataGrid" to \
            "true,true,true,true,true,true,true,true,true"
      
   else if tCardWidth >= 1024 then

      set the dgProp["column visibility"] of group "myDataGrid" to \
            "true,true,true,true,true,true,true,true,true"
      
   else if tCardWidth >= 800 then

      set the dgProp["column visibility"] of group "myDataGrid" to \
            "true,false,true,false,false,false,true,true,true"
      
   else
      set the dgProp["column visibility"] of group "myDataGrid" to \
            "true,false,false,false,false,false,true,true,true"
      
   end if
   set the lockScreen to false