想尽量丰富DBGRID的显示格式,如:
1。多列的列头合并;
2。列头显示多行
3。列头显示排序的图样。
一些三方控件写得很复杂,看得眼花花。想简单些,直接继承或者从CUSTOMDBGRID继承的就可以了。
高手们,多指教!!!

解决方案 »

  1.   

    这个不可能的,还是用dbgridth吧
      

  2.   

    呵呵,不好意思,应该是dbgrideh
      

  3.   

    建议去下载别的控件吧,比如XlGrid,搜索一下吧
    我这有原码,要的话发邮件给我。[email protected]
      

  4.   

    sigh......除了第三方控件我们还有什么吗?
    关于表头
      

  5.   

    stringgrid 可以实现
    dbgrideh可能是第三方控件,6里面是没有的
      

  6.   

    dbgrideh有支持d6甚至d7的,你说的这些它早就实现了,何必自己还非要区重写一个???
      

  7.   

    sigh......除了第三方控件我们还有什么吗?
    关于表头
      

  8.   

    Delphi 的 TDBGrid 支持表头的合并和多行显示。可以看看帮助中的说明。Depending on the value of the dataset抯 ObjectView property, a grid displays ADT and array fields either flattened out, or in an object mode, where the field can be expanded and collapsed. When ObjectView is True, the object fields can be expanded and collapsed. When a field is expanded, each child field appears in its own column with a title bar, which are below the title bar of the ADT or array field itself. When the field is collapsed, only one column appears with an uneditable comma delimited string containing the child fields. A column can be expanded and collapsed by clicking on the arrow in the title bar of the field, and by setting the Expanded property of the column. When the dataset抯 ObjectView property is False, each child field appears in a separate column.Property Object Purpose
    Expandable TColumn Specifies whether the column can be expanded to show child fields in separate, editable columns.
    Expanded TColumn Specifies whether the column is expanded.
    MaxTitleRows TDBGrid Specifies the maximum number of title rows that can appear in the grid.
    ObjectView TDataSet Specifies whether fields are displayed flattened out, or in an object mode, where each object field can be expanded and collapsed.
    ParentColumn TColumn Refers to the TColumn object that owns the child field抯 column.
    The following figure shows the grid with an ADT field and an array field. The dataset抯 ObjectView property is set to False so that each child field has a column.The following figures show the grid with an ADT field and an array field. The first figure shows the fields collapsed. In this state they cannot be edited. The second figure shows the fields expanded. The fields are expanded and collapsed by clicking on the arrow in the fields title bar.