【发布时间】:2013-03-04 19:02:17
【问题描述】:
如何在 FireMonkey 的 TStringGrid 中创建一个显示行号的列?
如果是使用 LiveBinding,我不知道怎么做。
【问题讨论】:
标签: delphi delphi-xe2 firemonkey tstringgrid
如何在 FireMonkey 的 TStringGrid 中创建一个显示行号的列?
如果是使用 LiveBinding,我不知道怎么做。
【问题讨论】:
标签: delphi delphi-xe2 firemonkey tstringgrid
您的表单/网格 OnGetValue 事件处理程序将该行作为其参数之一传递。只需验证列是您想要的列并返回行号。
function Form1.Grid1GetValue(const Row, Col: Integer): TValue;
begin
if Col = 0 then
Result := TValue.From<Integer>(Row);
end;
【讨论】: