Custom Control with DataControlField

M

Marten Engblom

I want to build my own custom control utilizing the DataControlField. What I
can't figure out is how to parse the markup such as:
<MyControls:MyCustomGridView . >
<Columns>
<asp:BoundField DataField="FirstName" HeaderText=" FirstName "
SortExpression=" FirstName " />
<asp:BoundField DataField="LastName" HeaderText=" LastName "
SortExpression=" LastName " />
</Columns>
</MyControls:MyCustomGridView>

into a DataControlFieldCollection? There has to be an already existing
mechanism by which the GridView control etc does this, that I can utilize?

I am suspecting there is a way to do this with the TemplateContainer
attribute, and then use InstantiateIn(), to parse the markup inside the
<Columns> element into a DataControlFieldCollection?

Any ideas?

Thank you in advance,
Marten
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top