Can we bind data to textbox in a headertemplate of a datagrid

V

Vijaya

Can we bind data to textbox in a headertemplate in a
template column of a datagrid?

If so please give some code snippets.

Thank you
 
V

vijay

Normally i think we cannot data to template columns, but there is an
other way around ... like you can write script to bind a DATAFIELD to
the Textbox in the Header Template.

ex:
....
<HeaderTemplate>
<input type=text value='<%#
DataBinder.Eval(Container.DataItem,"DATAFIELD").ToString())%>'
</HeaderTemplate>
....
DATAFIELD can be any field in the DATASOURCE bound to the DATAGRID.
 
V

Vijaya

Can we actually bind data to a header template of a
datagrid in a item template?
i have tried in the way given below but it is not
working .
Please suggest me some other way.

Thank you
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top