Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
create grid columns at run time
#1
very simple project.

add 2 columns to grid.
refresh / invalidate / render - nothing help.......

if i will do something like that in the VCL framework it would work....

any body have idea? is it always like this in intraweb?
is there any full documentation for any new components?
dose the demos are relevant to version 15.xxx ++

dose the demo for madexception working? in version 15.xxx

dose atozed have to respect some one how bought there components?

==========================
this is the same project with VCL ehlib components
==========================

procedure TForm12.Button1Click(Sender: TObject);
begin
  DBGridEh1.Columns.Add;
  DBGridEh1.Columns[0].Title.Caption := 'code';
  DBGridEh1.Columns[0].Visible := true;;
  DBGridEh1.Columns.Add;
  DBGridEh1.Columns[1].Title.Caption := 'name';
  DBGridEh1.Columns[1].Visible := true;;
end;

===========================
this is the code in intraweb
===========================
unit Unit1;

interface

uses
  Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, IWCompButton,
  Vcl.Controls, IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl,
  IWjQGrid, Vcl.Forms, IWVCLBaseContainer, IWContainer, IWHTMLContainer,
  IWHTML40Container, IWRegion, IWCompLabel;

type
  TIWForm1 = class(TIWAppForm)
    IWRegion1: TIWRegion;
    IWjQGrid1: TIWjQGrid;
    IWButton1: TIWButton;
    IWLabel1: TIWLabel;
    procedure IWButton1Click(Sender: TObject);
  public
  end;

implementation

{$R *.dfm}


procedure TIWForm1.IWButton1Click(Sender: TObject);
begin
  IWjQGrid1.Columns.Add;
  TjQGridColumn(IWjQGrid1.Columns[0]).Title := 'code';
  TjQGridColumn(IWjQGrid1.Columns[0]).Visible := True;
  IWjQGrid1.Columns.Add;
  TjQGridColumn(IWjQGrid1.Columns[1]).Title := 'name';
  TjQGridColumn(IWjQGrid1.Columns[1]).Visible := True;


  IWjQGrid1.DoRefreshControl := true;
  IWjQGrid1.Refresh;
  IWjQGrid1.Invalidate;

  Self.AsyncRenderComponent(IWRegion1);

  IWLabel1.Caption := ' there are ' + IntToStr(IWjQGrid1.Columns.Count) + ' columns';

end;

initialization
  TIWForm1.SetAsMainForm;

end.


Attached Files Thumbnail(s)
       

.zip   Project1.zip (Size: 54.34 KB / Downloads: 4)
Reply


Messages In This Thread
create grid columns at run time - by mazluta - 07-17-2020, 11:08 AM
RE: create grid columns at run time - by kudzu - 07-17-2020, 06:06 PM
RE: create grid columns at run time - by mazluta - 07-17-2020, 06:32 PM
RE: create grid columns at run time - by kudzu - 07-17-2020, 06:49 PM
RE: create grid columns at run time - by fduenas - 07-17-2020, 08:28 PM
RE: create grid columns at run time - by mazluta - 07-17-2020, 08:47 PM
RE: create grid columns at run time - by fduenas - 07-19-2020, 02:11 AM
RE: create grid columns at run time - by mazluta - 07-19-2020, 06:55 AM
RE: create grid columns at run time - by fduenas - 07-19-2020, 07:06 PM
RE: create grid columns at run time - by mazluta - 07-19-2020, 08:53 PM
RE: create grid columns at run time - by mazluta - 07-20-2020, 12:31 PM
RE: create grid columns at run time - by mazluta - 07-21-2020, 08:25 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)