var I: Integer; begin do begin AdvStringGrid1.AddCheckBox(, I, True, True); AdvStringGrid1.Cells[,I] := '第二列' + I.ToString; AdvStringGrid1.Cells[,I] := '第三列' + I.ToString; end; end; 但是你会发现,checkbox再单元的左侧了,想居中 怎么办,经过研究发现了advstring自身的一处bug,复选框是写死在左侧的.
我用的版本是1.25的.每个版本用法有一点不同 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.Data.SqlClient; using NPOI.HS