473,387 Members | 1,541 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.

Checkbox event in a Datagrids

Does anyone know how to write code which displays the contents of a row in a
datagrid, into a label outside of the datagrid. I want this to happen when a
checkbox in a datagrid is checked.

My datagrid is as follows: -

<asp:DataGrid id="DataGrid1" runat="server" Width="100%"
AutoGenerateColumns="False">
<HeaderStyle Height="20px" Font-Bold="False" BackColor="#666699"
ForeColor="#ffffff"></HeaderStyle>
<Columns>
<asp:TemplateColumn HeaderImageUrl="../Images/Tick.gif">
<HeaderStyle HorizontalAlign="Center" Height="20px" Width="10px"
CssClass="dgHeader" VerticalAlign="Middle"></HeaderStyle>
<ItemStyle HorizontalAlign="Center" Width="10px"
VerticalAlign="Middle"></ItemStyle>
<ItemTemplate>
<asp:CheckBox ID="chkSelection" Runat="server"></asp:CheckBox>
</ItemTemplate>
</asp:TemplateColumn>
<asp:BoundColumn HeaderStyle-Font-Bold="True" DataField="FullAddress"
HeaderText="Address">
<ItemStyle Font-Size="10pt" Height="11px" ForeColor="#666699"
CssClass="A"></ItemStyle>
</asp:BoundColumn>
</Columns>
</asp:DataGrid>
Jul 21 '05 #1
0 832

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

Similar topics

2
by: Menelty | last post by:
I have 2 datagrids on my page and each one has a template column which has a checkbox relating to each specific row. I usually have one on the page and use javascript to make sure there has been x...
3
by: John Smith | last post by:
Hey folks, Does anyone know if it's possible for me to determine on a checkbox's checkedchanged event whether the actual box was clicked or if it's text was clicked? I know with DataGrids you...
0
by: mike | last post by:
Hi there: I've read an excellent "how to"-article by Microsoft (no. 306227) - partly cited cited at the end of this email). I have implemented the code related to the part "How to Add a...
1
by: DJ Dev | last post by:
Hi, I am stuck at a problem for 3 days now. I create runtime datagrids depending on the user selections and they may vary from 2-10 depending on user selection at runtime. The datagrids are...
2
by: bebop | last post by:
I'm using three checkbox web controls in C# .NET and one button, and one labe Is there a way to "group" these individual checkbox web controls If so, do I use a for loop, hashtable, array,...
17
by: Mike Fellows | last post by:
im trying (unsucessfully) to add a checkbox column to my datagrid i basically have a datagrid that im populating from a dataset Me.DataGrid1.DataSource = ds.Tables(0) the datagrid then has 5...
0
by: Stephen | last post by:
Does anyone know how to write code which displays the contents of a row in a datagrid, into a label outside of the datagrid. I want this to happen when a checkbox in a datagrid is checked. My...
2
by: =?Utf-8?B?UmljaA==?= | last post by:
Is there a cancel argument for cancelling if you want to check or uncheck a checkbox? In the checkChanged event of a checkbox I ask the user if they are sure they want to check/uncheck...
1
by: iderocks | last post by:
Hi All, I created a dynamic checkbox in ASP .Net inside a Button1_Click event method (outside the page_load event) and performed the event handling method for the CheckedChanged event and when I...
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: 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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...

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.