- Регистрация
- 9 Май 2015
- Сообщения
- 1,600
- Баллы
- 155
Intro
Grid systems represents an important part of the UI design for database applications – a key application type for RAD Studio users. Aware of that Embarcadero is providing a full version of the powerful for both VCL and FMX as part of the current (the promo also brings Interbase ToGo and DerScanner, depending on the RAD Studio, Delphi or C++ Builder edition you select)!
If you want to give it a try, there is a trial version available directly from . The installer is also packed with a good amount of samples and documentation, which are also accessible from their .
Getting started with teeGrid for VCL and FMX
Despite the good set of samples that are available provided by Steema, I decided to build something from scratch to better explorer some specific features that caught my attention when visiting the product documentation.
You can check out and download the entire demo from my , but I’d like to emphasize some of the interesting features I selected for this sample. Notice this is a VCL based application, but the same features are also available for FMX.
The Steema teeGrid System can be very useful while you are modernizing an existing solution or creating a new one, supporting not only VCL but also FMX on different platforms, like this sample running on Linux:
To know more about the current promo and all the details, please, visit the , or contact your sales representant!
Grid systems represents an important part of the UI design for database applications – a key application type for RAD Studio users. Aware of that Embarcadero is providing a full version of the powerful for both VCL and FMX as part of the current (the promo also brings Interbase ToGo and DerScanner, depending on the RAD Studio, Delphi or C++ Builder edition you select)!
If you want to give it a try, there is a trial version available directly from . The installer is also packed with a good amount of samples and documentation, which are also accessible from their .
Getting started with teeGrid for VCL and FMX
Despite the good set of samples that are available provided by Steema, I decided to build something from scratch to better explorer some specific features that caught my attention when visiting the product documentation.
You can check out and download the entire demo from my , but I’d like to emphasize some of the interesting features I selected for this sample. Notice this is a VCL based application, but the same features are also available for FMX.
- Applying a theme: if your app is using a theme, you can apply the current theme to the Grid with just one line of code:
| TVCLGridThemes.ApplyTo(TeeGrid1); |
- Formatting one or more columns: you can apply specific formats to one or more columns, for example:
| TeeGrid1.Columns[0].ParentFormat := False; TeeGrid1.Columns[0].Format.Font.Color := clRed; |
- Formatting one or more cells: you can apply specific formats to one cell based on the values and etc:
| TeeGrid1.Columns['SALARY'].OnPaint := myPaint; procedure TMainForm.myPaint(const Sender: TColumn; var AData: TRenderData; var DefaultPaint: Boolean); DefaultPaint := True; if AData.Data.ToDouble <= 27000 then AData.Painter.SetFontColor(clRed); AData.Painter.Fill(AData.Bounds, clYellow); AData.Painter.SetFontColor(clBlack); |
- Locking one or more columns: you can lock columns in order to provider a better data navigation
| TeeGrid1.Columns['EMP_NO'].Locked := TColumnLocked.Left; TeeGrid1.Columns['EMP_NO'].ParentFormat := False; TeeGrid1.Columns['EMP_NO'].Format.Brush.Show; TeeGrid1.Columns['EMP_NO'].Format.Brush.Color := TColors.Navajowhite; |
- Row Heights can be adjusted as well via code
| TeeGrid1.Rows.Height.Automatic := False; TeeGrid1.Rows.Height.Value := 50; |
- Range Selections allow the user to select and copy data directly from the grid
| TeeGrid1.Selected.Range.Enabled := True; Clipboard.AsText := TCSVData.From(TeeGrid1.Grid, TeeGrid1.Selected); |
- Row Totals can be added on the fly, for example
| Totals: TColumnTotals; Totals := TColumnTotals.Create(TeeGrid1.Footer); Totals.Calculation.Add('Salary', TColumnCalculation.Sum); Totals.Format.Brush.Gradient.Visible := False; Totals.Format.Brush.Gradient.Visible := False; Totals.Format.Brush.Color := clYellow; Totals.Format.Brush.Visible := True; Totals.Format.Font.Size := 9; Totals.Format.Font.Style := [fsBold]; |
- You can also add groups with subgrids, and order the data by clicking on the columns title by adding just few lines of code, like you can check in the .
The Steema teeGrid System can be very useful while you are modernizing an existing solution or creating a new one, supporting not only VCL but also FMX on different platforms, like this sample running on Linux:
To know more about the current promo and all the details, please, visit the , or contact your sales representant!
Источник: