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

  • Thread starter Thread starter Vijaya
  • Start date Start date
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
 
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.
 
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
 
Back
Top