DataGrid operation causes freeze of screen

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
CAsba
Posts: 431
Joined: Fri Sep 30, 2022 12:11 pm

DataGrid operation causes freeze of screen

Post by CAsba » Wed Jul 24, 2024 11:12 am

Hi all,
I'm using the following code

Code: Select all

dispatch "ResetList" to group "DataGrid 3" of cd "manage products"
   put the dgprops["columns"] of grp "datagrid 3" into tColumns   
      repeat for each line tColumn in tColumns
      set the dgColumnIsVisible[tColumn] of grp "datagrid 3" to false
   end repeat
to hide all the columns (in order to then list the required columns).
The columns are hidden, but the screen freezes - there is a cursor, still movable,
but clicking on anything does not work, similarly, keyboard shortcuts do not work.

To recover, I have used ctrl-alt-del.

Is there something I could add to the code to stop this happening ?

CAsba
Posts: 431
Joined: Fri Sep 30, 2022 12:11 pm

Re: DataGrid operation causes freeze of screen

Post by CAsba » Wed Jul 24, 2024 12:54 pm

Problem solved !!
I scripted

Code: Select all

 dispatch "ResetList" to group "DataGrid 3" of cd "manage products"
   put the dgprops["columns"] of grp "datagrid 3" into tColumns   
   repeat for each line tColumn in tColumns
      set the dgColumnIsVisible[tColumn] of grp "datagrid 3" to false
      set the dgColumnIsVisible ["discrec"] of grp "datagrid 3" to true
   end repeat
that is, I added an instruction to show a column, and works perfectly.

Post Reply