473,396 Members | 1,945 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,396 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 2036
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
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...
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
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,...
0
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...

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.