S snowdeep Unregistered / Unconfirmed GUEST, unregistred user! 2000-12-19 #1 另外: 如何将DBGrid中的某一个记录用鼠标拖放到一个ListBox中去? 谢谢! 好久没有来了,各位都好吗?cAkk还在这里吗?你好吗cAkk
E eyes4 Unregistered / Unconfirmed GUEST, unregistred user! 2000-12-19 #2 显示整列值: procedure TForm1.DBGrid1CellClick(Column: TColumn); begin query1.close; query1.Databasename:=table1.DatabaseName; query1.SQL.Clear; query1.Sql.add('select ' + column.FieldName+' from '+table1.TableName); query1.Prepare; query1.open; end; 显示点中的值: procedure TForm1.DBGrid1CellClick(Column: TColumn); begin edit1.text:=dbgrid1.DataSource.DataSet.fieldbyname(column.FieldName).AsString; end; 拖放我再想想
显示整列值: procedure TForm1.DBGrid1CellClick(Column: TColumn); begin query1.close; query1.Databasename:=table1.DatabaseName; query1.SQL.Clear; query1.Sql.add('select ' + column.FieldName+' from '+table1.TableName); query1.Prepare; query1.open; end; 显示点中的值: procedure TForm1.DBGrid1CellClick(Column: TColumn); begin edit1.text:=dbgrid1.DataSource.DataSet.fieldbyname(column.FieldName).AsString; end; 拖放我再想想
Y yypfly Unregistered / Unconfirmed GUEST, unregistred user! 2000-12-19 #3 对.可以用DBGrid1CellClick事件获得所击的列对应的值。
B balaschen Unregistered / Unconfirmed GUEST, unregistred user! 2000-12-19 #4 DBGrid1.SelectedIndex表示第几列,DBGrid1.SelectedField表示该列所在的字段名称。
E eyes4 Unregistered / Unconfirmed GUEST, unregistred user! 2000-12-19 #6 至于拖放好象Delphi的TDBGrid控件无法解决,只有自己写控件了, 关于这可在已答问题中查找。