Hi,
As your description, you want to change the control's skinid in the gridview on the rowdatabound event. Is it right?
In fact, you must assign the theme and skinID of controls early on in the page lifecycle, in the PreInit event. This event fires before initialzation of the controls begins, meaning that the theme is able to effect the render before the render is started.
The following code sample demostrates this:
void Page_PreInit(object sender, EventArgs e)
{
Button.SkinID = "MySkin";
}
But you can change the control's cssClass in any event.
In order to solve your problem, I would suggested you use the cssClass instead of changing the control's skinID.
Hope it helps.
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
Yours sincerely,
Amanda Wang
Microsoft Online Community Support