473,583 Members | 2,858 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2785
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.Data Item,"DATAFIELD ").ToString())% >'
</HeaderTemplate>
....
DATAFIELD can be any field in the DATASOURCE bound to the DATAGRID.

"Vijaya" <an*******@disc ussions.microso ft.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:
....
<HeaderTemplat e>
<input type=text value='<%#
DataBinder.Eva l(Container.Dat aItem,"DATAFIEL D").ToString ())%>'</HeaderTemplate>
....
DATAFIELD can be any field in the DATASOURCE bound to the DATAGRID.
"Vijaya" <an*******@disc ussions.microso ft.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
15735
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 columns to show some of the columns. Few of the columns have textboxes to make them available for editing. I am trying to update the dataset all at...
6
3311
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 different rows in the datagrid, the textbox content doesn't change to reflect the change. How can I address this? Also, If the user change the...
0
1919
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 is exposed. Is there a way to bind the ddl inside of an already databound templated column? Thanks , of course Michael
1
1860
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 columns to show some of the columns. Few of the columns have textboxes to make them available for editing. I am trying to update the dataset all at...
4
8058
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" runat="server" Width="100%" Visible="False" Height="160px" AutoGenerateColumns="False" AllowSorting="True" onselectedindexchanged="GetRow">
4
2636
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 System.Web.SessionState; using System.Web.UI;
0
1134
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 first template column has a textbox, the second has an add link. When I click on the add link after typing data in the textbox, I get the...
2
8586
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 ID="datagrid" Runat="server" ShowHeader="True"> <Columns> <asp:TemplateColumn> <HeaderTemplate> <asp:Label ID="Label1" Runat="server" Text='<%#
10
2916
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 add a new person to the list. There is also an Edit button at the end of each row that allows the user to edit a particular row. So far - no...
0
8159
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8314
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7922
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8185
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5689
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5366
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3811
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2317
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1147
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.