Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9025375
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T06:15:27+00:00 2026-06-16T06:15:27+00:00

I have grid panel 16 x 4 like this one: Sometimes i want to

  • 0

I have grid panel 16 x 4 like this one:

enter image description here

Sometimes i want to hide some rows and to move bottom rows up. When I set component visible property to false the layout is not updated:

enter image description here

Nevertheless the row size type is set to auto:

enter image description here

Why the component don’t set row height to zero when there is nothing to display?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T06:15:28+00:00Added an answer on June 16, 2026 at 6:15 am

    Why the component don’t set row height to zero when there is nothing to display ?

    Because the row is considered as empty only if there are no components in all columns in that row, not if they’re visible or not. So the same returns the IsRowEmpty method. To workaround this, you’d need to be notified by the cell component about its visibility change. When this notification is generated, you can check the row just like the IsRowEmpty method does, except you’ll check if the controls are visible, not if they’re assigned. Based on the result of such method, you can then set the size of the Value to 0 to hide the row.

    With a help of interposed class, the method for checking if all controls in a row or column are visible, you might write something like this. Those methods return True, when all existing controls in a certain row or column are visible, False otherwise:

    uses
      ExtCtrls, Consts;
    
    type
      TGridPanel = class(ExtCtrls.TGridPanel)
      public
        function IsColContentVisible(ACol: Integer): Boolean;
        function IsRowContentVisible(ARow: Integer): Boolean;
      end;
    
    implementation
    
    function TGridPanel.IsColContentVisible(ACol: Integer): Boolean;
    var
      I: Integer;
      Control: TControl;
    begin
      Result := False;
      if (ACol > -1) and (ACol < ColumnCollection.Count) then
      begin
        for I := 0 to ColumnCollection.Count -1 do
        begin
          Control := ControlCollection.Controls[I, ACol];
          if Assigned(Control) and not Control.Visible then
            Exit;
        end;
        Result := True;
      end
      else
        raise EGridPanelException.CreateFmt(sInvalidColumnIndex, [ACol]);
    end;
    
    function TGridPanel.IsRowContentVisible(ARow: Integer): Boolean;
    var
      I: Integer;
      Control: TControl;
    begin
      Result := False;
      if (ARow > -1) and (ARow < RowCollection.Count) then
      begin
        for I := 0 to ColumnCollection.Count -1 do
        begin
          Control := ControlCollection.Controls[I, ARow];
          if Assigned(Control) and not Control.Visible then
            Exit;
        end;
        Result := True;
      end
      else
        raise EGridPanelException.CreateFmt(sInvalidRowIndex, [ARow]);
    end;
    

    And the usage shown for the first row:

    procedure TForm1.Button1Click(Sender: TObject);
    begin
      // after you update visibility of controls in the first row...
      // if any of the controls in the first row is not visible, change the 
      // row's height to 0, what makes it hidden, otherwise set certain height
      if not GridPanel1.IsRowContentVisible(0) then
        GridPanel1.RowCollection[0].Value := 0
      else
        GridPanel1.RowCollection[0].Value := 50;
    end;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have grid something like this: Ext.define('Exp.view.dashboard.Tv', { extend: 'Ext.grid.Panel', initComponent: function() { this.columns
I have a set of records in a panel grid where I want to
I have a grid panel like this Ext.define('sCon.view.SalesGrid',{ extend: 'Ext.grid.GridPanel', title: 'Sales Data', //other
I have a view designed like that: Ext.define('MY.view.NotificationMails', { extend: 'Ext.grid.Panel', alias: 'widget.NotificationMailsPanel', id:
Situation: I have a wrapper panel UserControl like this (namespaces and visual details removed
I have a grid view like this : <telerik:RadGrid ID=RadGrid1 runat=server GridLines=None AllowPaging=true PageSize=20
I have a panel defined like this: var msgDetailsPanel = new Ext.ux.ManagedIFrame.Panel({ title: 'M',
I have an XML file that contains one set of data and this has
I'm using ExtJs 4. I have a panel that looks something like this: var
I have a grid panel in ExtJS 4 with the following features: extend :

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.