比如第三行 第四列
table1[3][4]; 语句怎么写的?type
TDBGridEx = class(TDBGrid)
function GetValue(row, col: integer):Variant;
end;
function TDBGridEx.GetValue(row, col: integer): Variant;
begin
// TDBGrid有行列索引,但它们是protected的
self.Row := row;
self.Col := col;
Result := self.SelectedField.AsVariant;
end;
有这个函数了,怎么调用啊?procedure TForm2.Button4Click(Sender: TObject);
begin
//这里怎么写,我要的表格table【3】【4】这个单元格的内容
end;
table1[3][4]; 语句怎么写的?type
TDBGridEx = class(TDBGrid)
function GetValue(row, col: integer):Variant;
end;
function TDBGridEx.GetValue(row, col: integer): Variant;
begin
// TDBGrid有行列索引,但它们是protected的
self.Row := row;
self.Col := col;
Result := self.SelectedField.AsVariant;
end;
有这个函数了,怎么调用啊?procedure TForm2.Button4Click(Sender: TObject);
begin
//这里怎么写,我要的表格table【3】【4】这个单元格的内容
end;
dbgridex.GetValue(row,col);
或
dbgridex.GetValue(row,col);