views:

149

answers:

1

I have a datagrid that I want to pass in a generic collection. On mouseover I want to test if the row has a specific column and return the value.

What I am trying to accomplish is to determine the type of objects in the grid based on the existence of a specific column. For example, if "SerialNo" exists I know the grid is currently holding a collection of Widgets. If "CustomerId" exists I know the grid is currently holding customers.

A: 

You can test if the row is of a certain type by casting the object and/or using type reflection on object the row is referencing. What are you trying to accomplish?

Michael S. Scherotter
I'm not sure what type of information is going to be stored in the grid. I am hoping to keep the grid from knowing what type of information its holding.
Detroitpro