in devexpress tooltipcontrollergetactiveobjectinfoeventargs
event there parameter passed function. there selectedcontrol
member variable points devex grid control object. here want can active gridview
(this because have several grids coming in here). can give me sample code selectedcontrol
gridview
?
private void mytooltipcontroller_getactiveobjectinfo(object sender, devexpress.utils.tooltipcontrollergetactiveobjectinfoeventargs e) {
if want view under mouse point can use gridcontrol.getviewat
method.
here example:
private void mytooltipcontroller_getactiveobjectinfo(object sender, devexpress.utils.tooltipcontrollergetactiveobjectinfoeventargs e) { var gridcontrol = e.selectedcontrol gridcontrol; if (gridcontrol != null) { var view = gridcontrol.getviewat(e.controlmouseposition); //your code here. } }
also, if want focused view can use gridcontrol.focusedview
property.
here example:
private void mytooltipcontroller_getactiveobjectinfo(object sender, devexpress.utils.tooltipcontrollergetactiveobjectinfoeventargs e) { var gridcontrol = e.selectedcontrol gridcontrol; if (gridcontrol != null) { var view = gridcontrol.focusedview; //your code here. } }