- О сервисе Прессе Авторские права Связаться с нами Авторам Рекламодателям...
- Quantum Grid. Отметки "Нравится": 2 644. Working out the framework of reality. A site dedicated to Physics and Quantum Mechanics.
- Create and run automated tests for desktop, web and mobile (Android and iOS) applications (.NET, C#, Visual Basic .NET, C++, Java, Delphi, C++Builder, Intel C++ and...
Best place for beginner's help is Devex's website, e.g. https://www.devexpress.com/Support/Center
As I think you've noticed, the problem with the TcxGrid (which is what the Quantum Grid now is) is its plethora of properties, nested properties and so on. Their demos show what the grid can do, but finding your way around the settings that make them work via the Object Inspector is a bit of a nightmare.
And of course when you start to play around in the OI, something you do stops it working and retracing your steps can be very hard.
So, I think a good place to get started is a project which creates the grid entirely in code so that everything gets defaults except what you explicitly set in code. As you can see, there is actually very little you need do to get a simple, data-bound, grid working at a basic level.
Try this
type TForm1 = class(TForm) CDS1: TClientDataSet; CDS1ID: TAutoIncField; CDS1Marked: TBooleanField; CDS1Value: TStringField; DS1: TDataSource; DBNavigator1: TDBNavigator; cxGrid1DBTableView1: TcxGridDBTableView; cxGrid1Level1: TcxGridLevel; cxGrid1: TcxGrid; procedure FormCreate(Sender: TObject); public cxGrid : TcxGrid; cxLevel : TcxGridLevel; cxView : TcxGridDBTableView; end;var Form1: TForm1;implementation{$R *.DFM}procedure TForm1.FormCreate(Sender: TObject);var i : Integer;begin CDS1.IndexFieldNames := 'ID'; CDS1.CreateDataSet; for i := 1 to 5 do begin CDS1.Insert; CDS1.FieldByName('Marked').AsBoolean := Odd(i); CDs1.FieldByName('Value').AsString := 'Value ' + IntToStr(i); CDS1.Post; end; CDS1.First; cxGrid := TcxGrid.Create(Self); cxGrid.Parent := Self; cxGrid.Width := 250; cxLevel := cxGrid.Levels.Add; cxLevel.Name := 'Firstlevel'; cxView := cxGrid.CreateView(TcxGridDBTableView) as TcxGridDBTableView; cxView.Name := 'ATableView'; cxLevel.GridView := cxView; cxView.DataController.DataSource := DS1; cxView.DataController.CreateAllItems;end;Нашлось 3 млн результатов