Jump to content

(solved) DBGrid - Problem with height of row with Locked Columns and DisplayMemo


AmericoKutomi

Recommended Posts

I am using Locked columns in a DBGrid. In the DBGrid there is a column with DisplayMemo = True, and Editor = UniMemo1.

When the DBGrid is shown, at first time, the locked columns appear with default height. After (at right) the locked columns, the height of the lines vary depending on the text on Memo Column. It is show in the image below.

2082919856_LockedandDisplayMemo.thumb.png.f3bec1ad7e816f1fa34da4f4a98a8b64.png

The only way I have found to correct the heights is when the form is resized. The result is that all lines in all columns are with the correct height. See the image below.

439613453_LockedandDisplayMemo2.thumb.png.d8897b0638192f92b24304b8b112d077.png

How can the DBGrid appears correctly when the frame is shown at first time?

Please, I appreciate any help.

Thanks

Americo

 

Link to comment
Share on other sites

1 hour ago, AmericoKutomi said:

I am using Locked columns in a DBGrid. In the DBGrid there is a column with DisplayMemo = True, and Editor = UniMemo1.

Hello,

Which build of UniGUI are you using?

How can we reproduce this issue? Do you have a simple app?

Link to comment
Share on other sites

  • 1 month later...
On 5/14/2020 at 3:17 AM, Sherzod said:

Hello,

Which build of UniGUI are you using?

How can we reproduce this issue? Do you have a simple app?

Шерзод, я использую FMSoft_uniGUI_Complete_Professional_1.90.0.1531.exe, у меня такая же проблема, строки съезжают. Что за баг?

Link to comment
Share on other sites

19 minutes ago, =GGG= said:

я использую FMSoft_uniGUI_Complete_Professional_1.90.0.1531.exe, у меня такая же проблема, строки съезжают. Что за баг?

"The only way I have found to correct the heights is when the form is resized. The result is that all lines in all columns are with the correct height. See the image below."

И это решает проблему?

Link to comment
Share on other sites

1 minute ago, Sherzod said:

"The only way I have found to correct the heights is when the form is resized. The result is that all lines in all columns are with the correct height. See the image below."

И это решает проблему?

у меня окна не изменяют форму, они находятся во вкладках

PanelTabSheetNew := TUniPanel.Create(TabSheetNew);
    PanelTabSheetNew.Align := alClient;
    PanelTabSheetNew.Parent := TabSheetNew;
    PanelTabSheetNew.AlignmentControl := TUniAlignmentControl.uniAlignmentClient;
    PanelTabSheetNew.Layout := 'fit';
    PanelTabSheetNew.BorderStyle := ubsNone;

    FCurrentFormTab := TUniFormClass(FindClass(Name)).Create(UniApplication);

    FCurrentFormTab.Parent := PanelTabSheetNew;
    FCurrentFormTab.Align := alClient;
    FCurrentFormTab.BorderStyle := bsNone;

 

Link to comment
Share on other sites

On 5/13/2020 at 6:17 PM, Sherzod said:

Hello,

Which build of UniGUI are you using?

How can we reproduce this issue? Do you have a simple app?

UniGUIVersion 1.90.0.1523

I made a simple app. There is only one form with a DBGrid. The first 3 columns are Locked. The last column in the grid is DisplayMemo (=true).

The database is in the source directory: DADOS.FDB and is a Firebird file.

When running the application, the line with IDPACIENTE = 26 has different heights: one for the locked columns, and higher height for the others. It is due to the last column has data.

The lines below are not even between locked and unlocked part of the grid.

image.thumb.png.3f68b66416f97d8da3fca8a443d6165e.png

DBGridLocked.zip

Link to comment
Share on other sites

Добрый день!

Та же проблема. IDE Delphi Rio 10.3.3, UNIGui 1.90.0.1531. В таблице класса UniDBTreeGrid имеются 3 Locked-столбца. Данные из ADOQuery, база данных MS SQL.  При обновлении данных перекашивает таблицу - либо отображается только верхняя часть, а дальше - пустая область, либо строки в фиксированной части имеют одну высоту (есть текстовое поле  с многострочными значениями), а в остальной другую. При этом, если изменить ширину столбца - таблица отрисовывается нормально. Если нет столбцов Locked, такого не происходит.

Hi!

Have the same problem. IDE Delphi Rio 10.3.3, UNIGui 1.90.0.1531. There are 3 columns with "Locked" property in UniDBTreeGrid table. Using ADOQuery as data source, (selected from MS SQL). Every time data refreshed, grid cottupted - only top half shown, the rest is empty area. Or locked part rows has height differs from other rows one (that happens when one of cells in locked part has multiple line text). If user resize any column - grid become correct. When no locked columns - corruption doesn't happen.

Link to comment
Share on other sites

1 hour ago, AmericoKutomi said:

I think you can reproduce the behavior using the sample program: "Memo and Image Column". I guess that if you Lock the first two columns, you will see the problem happening.

I was able to reproduce. Can you please open a ticket in the support portal?

Link to comment
Share on other sites

On 6/17/2020 at 6:34 PM, AmericoKutomi said:

I guess that if you Lock the first two columns, you will see the problem happening.

Hello,

Can you try with this approach?

UniDBGrid.ClientEvents.UniEvents ->

function afterCreate(sender) 
{
    var me = sender;
    if (me.lockedGrid) {
        me.lockedGrid.view.on('refresh', function() {
            try {
                me.syncLockedWidth()
            } 
            catch(err) {}
            finally {}
        })
    }
}

 

  • Like 1
Link to comment
Share on other sites

  • 1 month later...
On 6/22/2020 at 7:07 AM, Sherzod said:

Hello,

Can you try with this approach?

UniDBGrid.ClientEvents.UniEvents ->


function afterCreate(sender) 
{
    var me = sender;
    if (me.lockedGrid) {
        me.lockedGrid.view.on('refresh', function() {
            try {
                me.syncLockedWidth()
            } 
            catch(err) {}
            finally {}
        })
    }
}

 

It works fine.

Thank you, Sherzod!

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...