Is it possible to use a TemplateField (or any *Field from a GridView) inside a user control (ascx).
I have a complex TemplateField (item, edit, footer) that I would like to easily reuse.
Thanks.
Is it possible to use a TemplateField (or any *Field from a GridView) inside a user control (ascx).
I have a complex TemplateField (item, edit, footer) that I would like to easily reuse.
Thanks.
GridView is a bit top-heavy for a user control - you could create a custom GridView in a separate control library and simply reuse it that way.
As the question is worded, there is no way. What it sounds like you are doing (making the elements of a TemplateColumn reusable) then there are two ways that come to mind right off.
One, put your User Control into the ItemTemplate/FooterTemlate of the TemplateColumn.
Two, build the complex GridView Column as a standalone server control, which you can use in place of a TemplateColumn (or BoundColumn).