473,387 Members | 1,516 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
Nov 17 '05 #1
2 2774
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").To String())%>'
</HeaderTemplate>
....
DATAFIELD can be any field in the DATASOURCE bound to the DATAGRID.

"Vijaya" <an*******@discussions.microsoft.com> wrote in message news:<03****************************@phx.gbl>...
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

Nov 17 '05 #2
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
-----Original Message-----
Normally i think we cannot data to template columns, but there is another way around ... like you can write script to bind a DATAFIELD tothe Textbox in the Header Template.

ex:
....
<HeaderTemplate>
<input type=text value='<%#
DataBinder.Eval(Container.DataItem,"DATAFIELD").T oString ())%>'</HeaderTemplate>
....
DATAFIELD can be any field in the DATASOURCE bound to the DATAGRID.
"Vijaya" <an*******@discussions.microsoft.com> wrote in

message news:<03****************************@phx.gbl>...
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

.

Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Amadelle | last post by:
Hi all and thanks in advance for your help, I have a problem with capturing the changed value of a text box in a datagrid. The datagrid is populated based on a dataset and I am using template...
6
by: Alpha | last post by:
I have several textboxes that I need to chang the text when the selection row is changed in a datagrid. I have the following code. This textbox displayes the initial selection but when I click on...
0
by: VbScripter | last post by:
In the code below, I have an editItemTemplate that will have to have a long list of ip's bound to it. The problem is that the lisbox is not seen by asp.net until after the datalist containing it...
1
by: Amadelle | last post by:
Hi all and thanks in advance for your help, I have a problem with capturing the changed value of a text box in a datagrid. The datagrid is populated based on a dataset and I am using template...
4
by: DBLWizard | last post by:
Howdy All, I am trying to get the data from a row of a data grid in asp.net This is a data grid with five columns (two of the hidden) as follows: <asp:datagrid id="grdMatching"...
4
by: Nu2ASP.NET | last post by:
I have the following code in my code behind page: using System; using System.Collections; using System.ComponentModel; using System.Data; using System.Drawing; using System.Web; using...
0
by: Tony Hedge | last post by:
Hello, I have done this before but now cannot get it to work... ASP.Net 1.1, a datagrid on a page. There are two template columns. Each of the those columns has a HeaderTemplate section. The...
2
by: Santosh | last post by:
Dear all i want to bind data to datagrid header template i am wrtting follwing code it is displaying data with in item template not but it is display data in header template <asp:DataGrid...
10
by: Corey B | last post by:
I have a data grid that has three columns: First Name, Middle Name, and Last Name. The grid has a list of people with a blank row at the bottom of the grid (in the footer) that allows the user to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.