Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > VCL

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 12-14-2010, 04:01 PM
MrBaseball34 MrBaseball34 is offline
Senior Member
 
Join Date: Jan 2001
Posts: 7,260
Default Attn: mshkolnik SMDBGrid question

Mike,
Having a problem with SMDBGrid. IT is not painting the rows correctly.
Here is my GetCellParams code:
Code:
  if (dbgInventory.DataSource.DataSet.FieldByName('procurement').AsInteger = 1) then
    Background := $00FFC0C0
  else
    Background := clWindow;
  if Highlight then
    Background := clHighlight;
And the attached image is how it looks. See the Description and Location columns? They aren't painting at all. Here is how I have the grid setup in the DFM (Delphi 7)
Code:
object dbgInventory: TSMDBGrid
  Left = 0
  Top = 0
  Width = 784
  Height = 269
  Align = alTop
  Ctl3D = False
  DataSource = dmMain.dsInventory
  Options = [dgTitles, dgIndicator, dgColumnResize, dgColLines, dgRowLines, dgTabs, dgRowSelect, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgMultiSelect]
  ParentCtl3D = False
  TabOrder = 0
  TitleFont.Charset = DEFAULT_CHARSET
  TitleFont.Color = clWindowText
  TitleFont.Height = -11
  TitleFont.Name = 'MS Sans Serif'
  TitleFont.Style = []
  Flat = True
  BandsFont.Charset = DEFAULT_CHARSET
  BandsFont.Color = clWindowText
  BandsFont.Height = -11
  BandsFont.Name = 'MS Sans Serif'
  BandsFont.Style = []
  Groupings = <>
  GridStyle.Style = gsNormal
  GridStyle.OddColor = clWindow
  GridStyle.EvenColor = clWindow
  TitleHeight.PixelCount = 24
  FooterColor = clBtnFace
  ExOptions = [eoCheckBoxSelect, eoDisableDelete, eoDisableInsert, eoENTERlikeTAB, eoKeepSelection, eoStandardPopup, eoAutoSave, eoBLOBEditor, eoTitleWordWrap, eoFilterAutoApply]
  OnGetCellParams = dbgInventoryGetCellParams
  RegistryKey = 'Software\Scalabium'
  RegistrySection = 'SMDBGrid'
  WidthOfIndicator = 30
  DefaultRowHeight = 17
  ScrollBars = ssHorizontal
  ColCount = 8
  RowCount = 2
  Columns = <
    item
      Expanded = False
      FieldName = 'inventory_id'
      Visible = False
    end
    item
      Expanded = False
      FieldName = 'inventory_part_number'
      Title.Alignment = taCenter
      Title.Caption = 'Part #'
      Width = 123
      Visible = True
    end
    item
      Expanded = False
      FieldName = 'inventory_alt_part_number'
      Title.Alignment = taCenter
      Title.Caption = 'Alt Part #'
      Width = 118
      Visible = True
    end
    item
      Alignment = taCenter
      Expanded = False
      FieldName = 'inventory_condition'
      Title.Alignment = taCenter
      Title.Caption = 'Cond Code'
      Width = 65
      Visible = True
    end
    item
      Expanded = False
      FieldName = 'inventory_quantity'
      Title.Alignment = taCenter
      Title.Caption = 'Quantity'
      Width = 65
      Visible = True
    end
    item
      Expanded = False
      FieldName = 'inventory_desc'
      Title.Alignment = taCenter
      Title.Caption = 'Description'
      Width = 229
      Visible = True
      TextEllipsis = teEnd
    end
    item
      ButtonStyle = cbsNone
      Expanded = False
      FieldName = 'inventory_location'
      Title.Alignment = taCenter
      Title.Caption = 'Location(s)'
      Width = 114
      Visible = True
      TextEllipsis = teEnd
    end>
end
Attached Images
File Type: jpg smdbgrid.jpg (21.3 KB, 10 views)
__________________
MrBaseball34

Hook 'em Horns
2005 College Football National Champions
2005 College Baseball National Champions
Reply With Quote
  #2  
Old 12-15-2010, 07:59 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,333
Default

I don't have the component, but my guess is that the "TextEllipsis = teEnd" is the problem. Don't know what it does though, but it's the only mutual difference between the correctly shown collumns and the unwanted ones...
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:34 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.