473,473 Members | 1,854 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Column of tick boxes - how to do it?

Hi

I have a bound gridview. I need to allow users to select multiple rows and
then press the process button to process multiple selected rows. For this I
want to use additional column of checkboxes (unbound?) which user can tick.

Is there an example of such a scenario somewhere that I can have a look at?

Thanks

Regards
Apr 15 '06 #1
5 1585
The solution ,

1.) Right Click on the datagrid in design view
2.) Choose Property Builder
3.)Choose Columns
4.) Add a template column
5.) OK, then right click over the grid again
6.)Choose Edit Template
7.) Select the template you just created
8.) Drag a checkbox to the Edit Item Template
9.) Give it a name you remember
A.) Right Click over the column and End Editing Templates

to use this you can iterate through the rows in the grid and for the
specific column with the checkbox in use the
..FindControl("YourCheckBoxName")

Voila !

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:Od**************@TK2MSFTNGP04.phx.gbl...
Hi

I have a bound gridview. I need to allow users to select multiple rows and
then press the process button to process multiple selected rows. For this
I want to use additional column of checkboxes (unbound?) which user can
tick.

Is there an example of such a scenario somewhere that I can have a look
at?

Thanks

Regards

Apr 15 '06 #2
Thanks. That is very useful. Just need a little hint on how to iterate the
grid and check for which checkboxes are ticked?

Thanks

"OHM ( One Handed Man )" <me@mine.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
The solution ,

1.) Right Click on the datagrid in design view
2.) Choose Property Builder
3.)Choose Columns
4.) Add a template column
5.) OK, then right click over the grid again
6.)Choose Edit Template
7.) Select the template you just created
8.) Drag a checkbox to the Edit Item Template
9.) Give it a name you remember
A.) Right Click over the column and End Editing Templates

to use this you can iterate through the rows in the grid and for the
specific column with the checkbox in use the
.FindControl("YourCheckBoxName")

Voila !

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:Od**************@TK2MSFTNGP04.phx.gbl...
Hi

I have a bound gridview. I need to allow users to select multiple rows
and then press the process button to process multiple selected rows. For
this I want to use additional column of checkboxes (unbound?) which user
can tick.

Is there an example of such a scenario somewhere that I can have a look
at?

Thanks

Regards


Apr 15 '06 #3
'//Something like this.
Dim cb As CheckBox
For Each row As GridViewRow In GridView1.Rows
If row.RowType = DataControlRowType.DataRow Then
cb = CType(row.Cells(row.Cells.Count -
1).FindControl("ControlName"), CheckBox)
If cb.Checked Then
'//Do Something
End If
End If
Next

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
Thanks. That is very useful. Just need a little hint on how to iterate the
grid and check for which checkboxes are ticked?

Thanks

"OHM ( One Handed Man )" <me@mine.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
The solution ,

1.) Right Click on the datagrid in design view
2.) Choose Property Builder
3.)Choose Columns
4.) Add a template column
5.) OK, then right click over the grid again
6.)Choose Edit Template
7.) Select the template you just created
8.) Drag a checkbox to the Edit Item Template
9.) Give it a name you remember
A.) Right Click over the column and End Editing Templates

to use this you can iterate through the rows in the grid and for the
specific column with the checkbox in use the
.FindControl("YourCheckBoxName")

Voila !

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:Od**************@TK2MSFTNGP04.phx.gbl...
Hi

I have a bound gridview. I need to allow users to select multiple rows
and then press the process button to process multiple selected rows. For
this I want to use additional column of checkboxes (unbound?) which user
can tick.

Is there an example of such a scenario somewhere that I can have a look
at?

Thanks

Regards



Apr 15 '06 #4
Feeling very stupid and sheepishly, I dare ask; Will this check only the
current page or all the records in the grid? I have pagination on the
gridview.

Thanks

"OHM ( One Handed Man )" <me@mine.com> wrote in message
news:eT**************@TK2MSFTNGP03.phx.gbl...
'//Something like this.
Dim cb As CheckBox
For Each row As GridViewRow In GridView1.Rows
If row.RowType = DataControlRowType.DataRow Then
cb = CType(row.Cells(row.Cells.Count -
1).FindControl("ControlName"), CheckBox)
If cb.Checked Then
'//Do Something
End If
End If
Next

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
Thanks. That is very useful. Just need a little hint on how to iterate
the grid and check for which checkboxes are ticked?

Thanks

"OHM ( One Handed Man )" <me@mine.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
The solution ,

1.) Right Click on the datagrid in design view
2.) Choose Property Builder
3.)Choose Columns
4.) Add a template column
5.) OK, then right click over the grid again
6.)Choose Edit Template
7.) Select the template you just created
8.) Drag a checkbox to the Edit Item Template
9.) Give it a name you remember
A.) Right Click over the column and End Editing Templates

to use this you can iterate through the rows in the grid and for the
specific column with the checkbox in use the
.FindControl("YourCheckBoxName")

Voila !

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:Od**************@TK2MSFTNGP04.phx.gbl...
Hi

I have a bound gridview. I need to allow users to select multiple rows
and then press the process button to process multiple selected rows.
For this I want to use additional column of checkboxes (unbound?) which
user can tick.

Is there an example of such a scenario somewhere that I can have a look
at?

Thanks

Regards



Apr 15 '06 #5
Try it, be brave !

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:Op**************@TK2MSFTNGP04.phx.gbl...
Feeling very stupid and sheepishly, I dare ask; Will this check only the
current page or all the records in the grid? I have pagination on the
gridview.

Thanks

"OHM ( One Handed Man )" <me@mine.com> wrote in message
news:eT**************@TK2MSFTNGP03.phx.gbl...
'//Something like this.
Dim cb As CheckBox
For Each row As GridViewRow In GridView1.Rows
If row.RowType = DataControlRowType.DataRow Then
cb = CType(row.Cells(row.Cells.Count -
1).FindControl("ControlName"), CheckBox)
If cb.Checked Then
'//Do Something
End If
End If
Next

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net
"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:OA**************@TK2MSFTNGP05.phx.gbl...
Thanks. That is very useful. Just need a little hint on how to iterate
the grid and check for which checkboxes are ticked?

Thanks

"OHM ( One Handed Man )" <me@mine.com> wrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
The solution ,

1.) Right Click on the datagrid in design view
2.) Choose Property Builder
3.)Choose Columns
4.) Add a template column
5.) OK, then right click over the grid again
6.)Choose Edit Template
7.) Select the template you just created
8.) Drag a checkbox to the Edit Item Template
9.) Give it a name you remember
A.) Right Click over the column and End Editing Templates

to use this you can iterate through the rows in the grid and for the
specific column with the checkbox in use the
.FindControl("YourCheckBoxName")

Voila !

--
( OHM ) - One Handed Man
AKA Terry Burns - http://TrainingOn.net

"John" <Jo**@nospam.infovis.co.uk> wrote in message
news:Od**************@TK2MSFTNGP04.phx.gbl...
> Hi
>
> I have a bound gridview. I need to allow users to select multiple rows
> and then press the process button to process multiple selected rows.
> For this I want to use additional column of checkboxes (unbound?)
> which user can tick.
>
> Is there an example of such a scenario somewhere that I can have a
> look at?
>
> Thanks
>
> Regards
>



Apr 15 '06 #6

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

Similar topics

2
by: Rene_Muench | last post by:
Hi there, I have listed 12 month on a continous form, where as I flag the current month with a tick box. To ensure at only 1 tick box is check not more or all I would want to validate and...
10
by: Martin Eyles | last post by:
Hi, I want to make a scale on a graph, by telling asp to insert empty divs of class tick, and the setting the style in css. I am trying to get a 3D effect by using colored top and bottom borders...
5
by: Paul Morrison | last post by:
Hi, I have a set of 4 checkboxes and I want to have a button that will check all the boxes. I have looked on Google but can only find examples of it being in Javascript. Is there any way of...
7
by: TimC | last post by:
Hello all, A question from someone who dabbles in Access. Is it possible to hide or ghost out a combo box (or set of them) on a Form, and only have them appear as a usable option if a tick box...
2
by: Dixie | last post by:
I have a table with records where each record has 14 tick boxes. Simply speaking, I want a report which shows each record for which any of the tick boxes is not ticked. It sounded simple until I...
5
by: Gem | last post by:
Hi There, I'm new to the fourm although I have used it lots of times looking for answers in the past and it's been great. Can someone give me a nudge in the right direction with this niggley naggley...
4
by: questionit | last post by:
Hi I have 2 tick boxes (say A and B) and a list box. I want following, can anyone help If tick-box A is checked: the list box will show all of its values If tick-box B is checked: the list...
4
by: paul.bentley | last post by:
I am trying to get a "Date entered" box to automatically fill when a tick box = true, without success so its over to the experts for some much needed help Thanks in advance
18
by: sweeneye | last post by:
Hi, I'm basing a query on the variables used in a form. The database contains lots of problems, say with a computer and a tick box for the apropriate component like monitor, keyboard, mouse etc....
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
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
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,...
1
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
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...

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.