473,395 Members | 2,079 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,395 software developers and data experts.

Datagrid Question

Hi Guys,

I am programming in VB .net. I have a datagrid with template column. Each
row as Checkbox and a Linkbutton in it. I have defined onCommand for
Linkbutton. I am having trouble figuring out how to find if the checkbox is
selected or not and retrieve value set for check box.

Please assist me on this.

Thanks

Manny
Nov 19 '05 #1
3 2035
Hi Manny,

You can use linkButton object's NamingContainer property
to find out clicked DataGridItem. Then use the
DataGridItem's FindControl method to get CheckBox object.
HTH

Elton Wang
el********@hotmail.com

-----Original Message-----
Hi Guys,

I am programming in VB .net. I have a datagrid with template column. Eachrow as Checkbox and a Linkbutton in it. I have defined onCommand forLinkbutton. I am having trouble figuring out how to find if the checkbox isselected or not and retrieve value set for check box.

Please assist me on this.

Thanks

Manny
.

Nov 19 '05 #2
Hi Manny,

You can use linkButton object's NamingContainer property
to find out clicked DataGridItem. Then use the
DataGridItem's FindControl method to get CheckBox object.
HTH

Elton Wang
el********@hotmail.com

-----Original Message-----
Hi Guys,

I am programming in VB .net. I have a datagrid with template column. Eachrow as Checkbox and a Linkbutton in it. I have defined onCommand forLinkbutton. I am having trouble figuring out how to find if the checkbox isselected or not and retrieve value set for check box.

Please assist me on this.

Thanks

Manny
.

Nov 19 '05 #3
In the Grid's ItemCommand event find the Checkbox via the ItemCommandEventArgs.Item.FindControl()
method.

CheckBox cb = e.Item.FindControl("CheckBoxID") as CheckBox;
// now get cb.Checked

-Brock
DevelopMentor
http://staff.develop.com/ballen
Hi Guys,

I am programming in VB .net. I have a datagrid with template column.
Each row as Checkbox and a Linkbutton in it. I have defined onCommand
for Linkbutton. I am having trouble figuring out how to find if the
checkbox is selected or not and retrieve value set for check box.

Please assist me on this.

Thanks

Manny


Nov 19 '05 #4

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

Similar topics

2
by: magister | last post by:
Hello, I have xml like this.... <test> <question>sdfsa</question> <section><question>43ga</question> <question>asdf</question> </test>
2
by: pei_world | last post by:
I want to implement a key hit with enter to dropdown a combobox that is in the datagrid. in this case I need to override its original behaviours. I found some codes from the web. Does anyone know...
2
by: Dominic | last post by:
Hi guys, I'm not sure if this question belongs to FAQ, but I couldn't find a concrete answer. I created a Datagrid control using ItemTemplate, but it's NOT a in-place editing datagrid. One of...
4
by: Jan Nielsen | last post by:
Hi all I'm a former Access developer who would like to implement a many-to-many relation in about the same way you do in Access: With a subform and a combo box. Is it possible to use a...
13
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.