cxGrid : How to create a Level/View programmatically at runtime
var
Grid: TcxGrid;
Level: TcxGridLevel;
View: TcxGridDBTableView;
...
Grid := TcxGrid.Create(SomeOwner);
Grid.Parent := SomeParent;
Level := Grid.Levels.Add;
Level.Name := 'SomeLevelName';
View := Grid.CreateView(TcxGridDBTableView) as TcxGridDBTableView;
View.Name := 'SomeViewName';
Level.GridView := View;
View.DataController.DataSource := SomeDataSource;
View.DataController.CreateAllItems;
end;
Copy from : http://www.devexpress.com/Support/Center/KB/p/A295.aspx
ไม่มีความคิดเห็น:
แสดงความคิดเห็น