在OnClick或者CurrentCellChanged事件里面写代码都可以。
你可以得到当前选中的行CurrentRowIndex