起步软件技术论坛-X3

 找回密码
 立即注册
搜索
查看: 136|回复: 4

【结】不能默认显示分组**

[复制链接]
发表于 2008-6-30 10:17:10 | 显示全部楼层 |阅读模式
数据集已设置分组,单运行功能是列表不能默认显示分组
列表组件设置如下
object DataGrid: TDataGrid
  Left = 0
  Top = 0
  Width = 640
  Height = 480
  Bands = <
    item
    end>
  DefaultLayout = False
  HeaderMinRowCount = 2
  HeaderPanelRowCount = 1
  Align = alClient
  Font.Charset = GB2312_CHARSET
  Font.Color = clWindowText
  Font.Height = -12
  Font.Name = #23435#20307
  Font.Style = []
  ParentFont = False
  TabOrder = 0
  BandFont.Charset = GB2312_CHARSET
  BandFont.Color = clWhite
  BandFont.Height = -12
  BandFont.Name = #23435#20307
  BandFont.Style = [fsBold]
  DefaultRowHeight = 19
  GridLineColor = clBtnFace
  GroupPanelColor = clSilver
  GroupPanelFontColor = clBlue
  GroupNodeColor = clWindow
  GroupNodeTextColor = clHighlight
  HeaderColor = clActiveCaption
  HeaderFont.Charset = GB2312_CHARSET
  HeaderFont.Color = clWhite
  HeaderFont.Height = -12
  HeaderFont.Name = #23435#20307
  HeaderFont.Style = []
  HideSelectionColor = 16744576
  HideSelectionTextColor = clWhite
  HighlightColor = 16744576
  HighlightTextColor = clWhite
  LookAndFeel = lfFlat
  OptionsView = [edgoBandHeaderWidth, edgoRowSelect, edgoUseBitmap, edoControlDraw]
  ShowGroupPanel = True
  OnCustomDrawCell = DataGridCustomDrawCell
  PaintStyle = psProject
  TreeLineColor = clGrayText
  ShowLines = False
  DataSource = dsbEventList
  Filter.Criteria = {00000000}
  OptionsDB = [edgoCanAppend, edgoCancelOnExit, edgoCanDelete, edgoCanInsert, edgoCanNavigation, edgoConfirmDelete, edgoLoadAllRecords, edgoUseBookmarks]
  PreviewFont.Charset = GB2312_CHARSET
  PreviewFont.Color = clBlue
  PreviewFont.Height = -12
  PreviewFont.Name = #23435#20307
  PreviewFont.Style = []
  DefaultFields = False
  SummaryGroups = <
    item
      DefaultGroup = True
      SummaryItems = <>
      Name = 'DataGridSummaryGroup2'
    end>
  SummarySeparator = ', '
  object DataGridFSTUAS: TDataGridColumn
    Width = 80
    BandIndex = 0
    RowIndex = 0
    ColumnDef.FieldName = 'FSTUAS'
  end
  object DataGridFREQUESTTYPE: TDataGridColumn
    Width = 80
    BandIndex = 0
    RowIndex = 0
    ColumnDef.FieldName = 'FREQUESTTYPE'
  end
  object DataGridFPriority: TDataGridColumn
    Width = 80
    BandIndex = 0
    RowIndex = 0
    ColumnDef.FieldName = 'FPriority'
  end
  object DataGridFSerious: TDataGridColumn
    Width = 80
    BandIndex = 0
    RowIndex = 0
    ColumnDef.FieldName = 'FSerious'
  end
  object DataGridFImpact: TDataGridColumn
    Width = 80
    BandIndex = 0
    RowIndex = 0
    ColumnDef.FieldName = 'FImpact'
  end
  object DataGridFEVENTCODE: TDataGridColumn
    Width = 80
    BandIndex = 0
    RowIndex = 0
    ColumnDef.FieldName = 'FEVENTCODE'
  end
  object DataGridFREQUESTPERSON: TDataGridColumn
    Width = 80
    BandIndex = 0
    RowIndex = 0
    ColumnDef.FieldName = 'FREQUESTPERSON'
  end
  object DataGridFEVENTINDATE: TDataGridColumn
    Width = 100
    BandIndex = 0
    RowIndex = 0
    ColumnDef.FieldName = 'FEVENTINDATE'
  end
  object DataGridFTITLE: TDataGridColumn
    Width = 200
    BandIndex = 0
    RowIndex = 0
    ColumnDef.FieldName = 'FTITLE'
  end
  object DataGridFDUALAFTERPERSON: TDataGridColumn
    Width = 150
    BandIndex = 0
    RowIndex = 0
    ColumnDef.FieldName = 'FDUALAFTERPERSON'
  end
end

未命名.png

107.67 KB, 下载次数: 88

回复

使用道具 举报

 楼主| 发表于 2008-6-30 10:18:47 | 显示全部楼层
功能运行效果如下,分组没有显示

未命名1.png

47.36 KB, 下载次数: 86

回复 支持 反对

使用道具 举报

发表于 2008-6-30 10:29:17 | 显示全部楼层
这好像是个缺陷,不过可以参考 http://bbs.justep.com/forum.php?mod=viewthread&tid=2483 1楼的代码来绕开,楼主,你试试
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-6-30 11:09:09 | 显示全部楼层
OK了,加上代码没问题
回复 支持 反对

使用道具 举报

发表于 2008-6-30 11:16:30 | 显示全部楼层
恩,结
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Justep Inc.

GMT+8, 2025-7-18 12:44 , Processed in 0.051026 second(s), 18 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表