You probably can't - not unless it was actually a DataGridViewCell (or derived class) instance in teh first place. You can check with the
is
and
as
keywords:
if (myObject is DataGridViewCell)
{
...
}
or
DataGridViewCell dgvc = myObject as DataGridViewCell;
if (dgvc != null)
{
...
}
If you are trying to put an object into a DataGridView and need a new cell to hold it though, create a new cell object and set it's properties appropriately for the object type you are trying to handle.
Sorry if that sounds a bit vague, but you didn't give us much to start with...