1. wwDBGrid1的 control type設為CustomEdit、Control Name為 wwExpendButton
2. wwExpendButton的 AutoHideExpend設True、DataSource與DataField設為wwDBGrid1顯示的內容、Grid設為wwDBGrid2、ShowAsButton與ShowText設為True
3. wwDBGrid2連結正確
標籤: wwdbgrid
DELPHI infopower wwdbgrid動態新增欄位
假如要新增的欄位名稱為abc
[pascal]
WWDBGRID1.AddField(‘abc’);
WWDBGRID1.ColumnByName(‘abc’).DisplayLabel :=’抬頭名稱’;
WWDBGRID1.ColumnByName(‘abc’).DisplayWidth := 10; //寬度
[/pascal]