原文:http://support.microsoft.com/kb/267745/en-us
[b]BUG: Hierarchical Flexgrid Row or Cell Selection Fails After Being Bound to an Empty Recordset
[/b]
SYMPTOMS
The Hierarchical Flexgrid control does not properly select rows or cells after it has been bound to an empty recordset and then rebound to a recordset that contains data. When you click a cell or a row, no row or cell is selected, or a row or cell that was not clicked is selected. When you use the EnterCell property of the grid to display the value in the cell you clicked, a value from a cell located above the cell you clicked displays instead. Back to the top
RESOLUTION
To work around this problem, test for the condition of an empty recordset prior to binding a recordset to the Hierarchical Flexgrid control. If the recordset is empty, disable the grid and do not set the empty recordset to the Datasource property. Later, if a recordset is retrieved that does contain data, enable the grid and bind the control as usual.
注:这是VB的一个BUG,当mshflexgrid绑定一个空记录时,就会出现不能点选任意记录(行、列)
解决方法:
Rs.Open "select port,tdesc from ptag ", Cnn, 1, 3
if rs.eof then
……
Set PtagGrid.DataSource = Rs(先判断记录是否为空,如果不为空才把RS绑定给mshflexgrid)
end if


找了一个晚上的资料,终于……
记住这个站点http://support.microsoft.com/
如果用ADODC进行数据绑定如何判断结果集是否为空呢?
注意recordset的cursortype类型,四种类型中,前两种还要关闭recordset,再次打开,后两种不用
顶顶顶顶顶顶顶顶,找了一百年的资料终于在你这里找到了,谢谢楼主!!!