I just need the code to add a row with text per column to a data grid. It can be for 开发者_如何学JAVADBGrid/DataGrid I won't mind but I'm struggling to find how to do it. Thanks
It has been a long while since I used dbgrid, but if I recall correctly, you can't add arbitrary text. The dbgrid control is bound to a recordset.
see: http://msdn.microsoft.com/en-us/library/aa231246%28v=vs.60%29.aspx
and/or
http://support.microsoft.com/kb/149092
try
grid.textmatrix(grid_col,grid_row) = "sample text"
精彩评论