Forum Discussion

blearyeye's avatar
blearyeye
Contributor
14 years ago

Inheriting from DataGrid

I have a Winform C# application. It includes a class MyDataGrid that inherits from DataGrid. In TestComplete 8, I've tried working with objects that instantiate MyDataGrid. TC doesn't recognize the objects as DataGrid and hence I can't use the DataGrid methods.



However, if I change the objects so that they instantiate DataGrid instead, it works. MyDataGrid includes code to catch and suppress certain mouse actions.



To let TC operate on these objects, it looks like I'll have to go thru the app and change MyDataGrid to DataGrid and in each case add the mouse suppression actions. This is possible, but definitely a pain. Is it necessary?

2 Replies