Problem with ShowRowsAlways

Hi,


I am trying to make visible in runtime an iwregion that contains an iwdbadvwebgrid.

First in design I put iwregion.visible := False and let the iwdbadvwebgrid.visible := True, then when I press a IWButton with iwregion.visible := True, I can see the region and the grid but did not show any records. If I use the property ShowRowsAlways := True it works but even the region.visible is false I can see the vertical and horizontal lines of the grid.

I try to set the ShowRowsAlways to True at runtime but did not work.

Give me some ideas, please.

Fernando Soriano
fsoriano@disoft.com.do

By the way, I am using Delphi XE and IW 11.0.48

- You can avoid the IWAdvWebGrid visible lines when it's parent region is hidden by changing the grid's visible property every time he region's visible property changes.
For example, if region.visible is false, also set grid.visible to false and if grid.visible is true, also set grid.visible to true.

- ShowRowsAlways should be set to true from the first render to make it work correctly. By design this property will have no effect when it's value is changed using an asynchronous refresh.
When happens the first render? Form's OnCreate event?

I tried this with no results: In Form's OnCreate put grid.visible to false then I can't see the lines, but when I try grid.visible = True, the grid does not show up.

I tried using AsyncUpdateAllCell after or before this line:

IWRegion.Visible := True;
        Grid.Visible    := True;
        Grid.AsyncUpdateAllCells;
  • Yes by "first render" I meant the properties configuration set in the Form's OnCreate event or through the object inspector in design time.

    - Please note that it's currently unfortunately not supported to hide an IWAdvWebGrid control on first render and then make it visible through an asynchronous event.
    Please use a non-async event instead or make sure IWAdvWebGrid.Visible is set to true.

Ok.. I hope you can add this feature soon.


Maybe this can be a solution:

Can I create at runtime this iwregion with the grid inside?? 

I've try with this code, but the iwregion does not appear:

procedure TFCotiza.IWButton1AsyncClick(Sender: TObject;
  EventParams: TStringList);
var
     iwr : TIWRegion;
begin
     iwr := TIWRegion.Create(PGral);
     iwr.Width  := 400;
     iwr.Height := 400;
     iwr.Visible := True;
     iwr.Name := 'iwr1';
     IWR.Left := 100;
     IWR.Top := 100;
end;