473,385 Members | 1,867 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,385 software developers and data experts.

Addiing checkbox control in a list box

I want to popolate one column of the recordset in the first column on the list box & also want to add checkbox in the second column of the list, All these things I want to do during runtime depending on the number of rows in the recordset.
Jul 17 '10 #1
2 2140
jimatqsi
1,271 Expert 1GB
A "checkbox" is a graphical representation of a true/false data item. There is no way to make a list box present the column graphically. You can make the underlying query return strings instead of the actual data (i.e 'yes' for a -1, 'no' for a 0 or any other string you choose true/false, shippped/not shipped, posted /not posted ....) but you cannot show a checkbox per se.

"Depending on the number of rows in the recordset" doesn't make any sense in this context. Tell us more about what you want to do.

Jim
Jul 17 '10 #2
You could use a combobox, with it's RowSource based on a table containing the information/checkboxes you want to display. For example, I have 2 tables: tblPC and tblUsers.
tblPC: PCID*, ComputerName (txt), UserID (num)
tblUsers: UserID*, UserName (txt), Awesome? (yes/no)
tblPC and tblUsers are related 1:many by UserID.
frmPC has a combobox with it's RowSource set to tblUsers, and a Column Count of 3 (Column Size = 0,1,1). When you expand the combobox, it shows the UserName | Awesome? fields.
Then add the Awesome? field to frmPC's record source and add a Awesome as a checkbox control to frmPC.
I hope that helps. Your question was a bit vague.
Attached Images
File Type: jpg answer scr1.jpg (7.0 KB, 330 views)
Jul 17 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: apple | last post by:
Hello, please help me I create a set of custom controls with IPostBackDataHandler, and postback processing. All worked correctly, only custom checkbox control postback value change only if I do...
6
by: Francois | last post by:
Hi, I am trying to implement a custom control that extends the standard System.Web.UI.WebControls.CheckBox control. In the .Net class library reference it is said that CheckBox Implements...
10
by: Jennyfer J Barco | last post by:
Hello, I have a datagrid that brings some information from a query. I need to have a checkbox in each row so the user can select the rows he wants to reprint. Is it possible to have a checkbox...
1
by: vikram | last post by:
i am setting enable property of check box control using javascript, but when form is posted back , it does not reflect correct enable value.i.e. if i have set checkbox control enabled to false in...
0
by: Graham | last post by:
Is there a known bug with the CheckBox control? I have subclassed the control and I am trying to add an onclick attribute in the code behind. I've tried putting the Attributes.Add in the Page_Load,...
4
by: Steven | last post by:
I am writing VB.NET, Can I add the checkbox control to a particular column on the datagrid? Thanks!
1
by: JP | last post by:
I have images within a datalist control. Below is a checkbox control that contains the SQL ID of the image blob. When the page is post back I want to iterate though checkbox collection to get...
7
by: schaefty | last post by:
I recently posted this on the incorrect forum, and so I would like to ask the question here. I did get some good ideas on the other group, but I have not yet come up with a solution for me. I am...
1
by: mani.shanku | last post by:
hi friendsplz..help me its urgent..... im making a jobportal site..when a person go for search the results should desplay.... like the naukri.com desplays..and when a person click on the checkbox...
41
bre1603
by: bre1603 | last post by:
I have a continuous form in Access 2007 called “Leadership Contact List.” It has a checkbox control for each record (bound to a field in the underlying table) that is used to email or create mailing...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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
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...

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.