sDbGrid Title in runtime

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #59801
    Witcher
    Participant

      Hello!

      Something wrong with your code sample.

      For example, what about DataSource and Parent for your Grid?

      I wrote code to check your question and my code works perfectly:

      Code:
      procedure TForm1.FormShow(Sender: TObject);
      var
      i : Integer;
      sDBGrid: TsDBGrid;
      begin
      sDBGrid := TsDBGrid.Create(Self); // Create sDBGrid instance
      sDBGrid.Parent := Self; // Grid will be placed on Form1
      sDBGrid.DataSource := dsApps; // dsApps is TDataSource component created in design-time and linked to TClientDataSet instance
      sDBGrid.Columns.Clear; // Clear columns for sure
      cdsApps.Open; // Activate our dataset
      for i := 0 to cdsApps.FieldCount – 1 do
      Begin
      sDBGrid.Columns.Add;
      sDBGrid.Columns.Field := cdsApps.Fields;
      sDBGrid.Columns.FieldName := cdsApps.Fields.FieldName;
      sDBGrid.Columns.Title.Caption := cdsApps.Fields.DisplayLabel + '_test'; // “_test” suffix placed here to
      // view difference between default column title values
      End;
      end;

      So, it seems that your question not related with AlphaControls directly, because your sample above will not works with any DBGrid.

      #59802
      ariopax
      Participant

        Hi

        If select xp luna or xp silver ,when click on dbgrid cell ,its content hide.

        Best Regards.

        #59805
        Witcher
        Participant

          What version of AlphaControls do you use?

          I have made checking with 14.29 – all cell's content draws correctly with XPLina and XPSilver skins.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.