rafpic62 Posted May 24, 2021 Share Posted May 24, 2021 I'm using a UniDBGrid on a Form and in the onshow event I set Some columns visible and some other not visible setting the .Visible property to True/False. This will cause the application lock with screenmask always visible with "Loading data..." message. Have anyone experienced the same problem? I'm using the 1479 build and upgrading to the recently purchased 1549. May be this issue was fixed from 1479 to 1549 ? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted May 24, 2021 Share Posted May 24, 2021 43 minutes ago, rafpic62 said: This will cause the application lock with screenmask always visible with "Loading data..." message. Hello, Could you plelase make a simple testcase to reproduce? Quote Link to comment Share on other sites More sharing options...
rafpic62 Posted May 24, 2021 Author Share Posted May 24, 2021 This is the function that handles the columns. The columns to hide have the field name enclosed in square brackets. Columns are by default all visible at startup. procedure applyImpostazioniPratiche(); var tsl: TStringList; s,fld: string; i,col: integer; begin s := UniMainModule.getUserImpostazioni(); if(trim(s) <> '') then begin tsl := TStringList.Create; tsl.Text := s; for i := 0 to tsl.Count-1 do begin s := trim(tsl[i]); if s <> '' then begin if Pos('HIDDEN_COLUMNS=',s) = 1 then begin s := Copy(s,16, 1000); for col := 0 to gridPratiche.Columns.Count-1 do begin fld := Uppercase('['+gridPratiche.Columns[col].FieldName+']'); if Pos(fld,s) > 0 then gridPratiche.Columns[col].Visible := False; end; end; end; end; end; end; Quote Link to comment Share on other sites More sharing options...
rafpic62 Posted May 24, 2021 Author Share Posted May 24, 2021 I'm now testing with last 1549 version of UniGui and the problem doesn't occur. Quote Link to comment Share on other sites More sharing options...
rafpic62 Posted June 6, 2021 Author Share Posted June 6, 2021 Sorry but the problem is still present. In few words with a dataset with a lot of records (about 1000) if I hide by code some grid columns it will freeze if I try do edit a single record and opening an edit form. The problem doesn't occur if the dataset has few records. Is there a way to programatically hide/show grid columns that you can suggest to me ? Thank you V.M. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 6, 2021 Share Posted June 6, 2021 55 minutes ago, rafpic62 said: Sorry but the problem is still present. In few words with a dataset with a lot of records (about 1000) if I hide by code some grid columns it will freeze if I try do edit a single record and opening an edit form. Hello, Sorry, can you make a simple testcase to reproduce? Quote Link to comment Share on other sites More sharing options...
rafpic62 Posted June 6, 2021 Author Share Posted June 6, 2021 Hi, it's not simple to make a test case. I have also experienced that the problem arises when I make visible a column with the unidbgrid default columns menu that allow to hide or show columns. Is there a way to capture this event ? when the visible columns is changed through this menu? I would try to refresh the underly dataset after that happen. Thank you V.M. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted June 6, 2021 Share Posted June 6, 2021 10 minutes ago, rafpic62 said: Is there a way to capture this event ? when the visible columns is changed through this menu? Hello, Please clarify your problem again sequentially, what doesn't work and what do you want to achieve? Quote Link to comment Share on other sites More sharing options...
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.