Custom Template loadable from database?

D

DC

Hi,

I need a GridView with highly customizable column layouts. I think
loading templates (from .ascx files) or making up classes that
implement ITemplate would do. BUT: the templates must be loadable from
a database. Ideally, I would store the text that is normally entered
in the <asp:TemplateColumn> tag and recreate the templates from
database at runtime.

Unfortunately TemplateColumn does not offer a Parse(string
templateData) method or something like that. I guess that is because
the templates need to be compiled on startup. TemplateControlParser
does not expose a lot.

I guess in the worst case I could write .ascx at runtime (taking the
template data from a database). I was just hoping somebody knows a
more elegant way.

Thanks for any feedback on this!

Regards
DC
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top