YourControlObject.GetType()
should return the type of the control.
You can then use it in your conditional statements like-
if(YourControlObject.GetType()==typeof(Button))
{
}
Regarding following line of code-
gvchannel.Rows[r.RowIndex].Cells[ix].Controls.GetType().Text = "Y";
You can not set type of control as such.
It would be helpful for us to give more acurate answer if you can explain what is your requirement.
Thanks