473,666 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Oh, If I only had columns in my CheckedListBox. ......Direction Please....

In my application I retrieve about 100 rows from an Access DB to
perform a daily process. A sql query statement selects, joins, and
orders the dataset. Now, out of the dataset, the user may need to
selection between 0 and 10 records to create transactions. Because I
have used the CheckedListBox, this seemed like a very logical way to
accomplish the manual selection .... UNTIL I wanted to have multiple
columns of data in the CLB.

I searched the net and remember seeing a way using tabs with SendMsg.
It just looked awkward.

I then looked at the DataGrid and found code to add a CheckBox that
worked fine. Now my issue is that it appears that I have to manuall
code the attributes of all the columns (there's 7 of them). Such
attributes as: .width, name, alignment, readonly, etc.

If only the CLB could easily have columns and the ability to get the
data both in and out, I'd be on my way.

I'm asking for suggestion on the best way to get this job done. I'm
assuming responses with be go with the DataGrid, but it looks as if
theres a bunch of coding with it.

What's your recommendation? Point to good examples.

Thanks,

Hexman
Dec 26 '05 #1
4 5511
Hexman,

The datagrid needs mostly less code than a CLB

http://www.vb-tips.com/default.aspx?...3-a3539697edbd

This is not exactly the sample for your problem.

However in my opinion is adding and extra dataview to the datatable with as
rowfilter the boolean column true, makes that you are almost there.

I hope this helps,

Cor
Dec 26 '05 #2
How about a Checked ListView (in details view)?

Greg

"Hexman" <He****@binary. com> wrote in message
news:fe******** *************** *********@4ax.c om...
In my application I retrieve about 100 rows from an Access DB to
perform a daily process. A sql query statement selects, joins, and
orders the dataset. Now, out of the dataset, the user may need to
selection between 0 and 10 records to create transactions. Because I
have used the CheckedListBox, this seemed like a very logical way to
accomplish the manual selection .... UNTIL I wanted to have multiple
columns of data in the CLB.

I searched the net and remember seeing a way using tabs with SendMsg.
It just looked awkward.

I then looked at the DataGrid and found code to add a CheckBox that
worked fine. Now my issue is that it appears that I have to manuall
code the attributes of all the columns (there's 7 of them). Such
attributes as: .width, name, alignment, readonly, etc.

If only the CLB could easily have columns and the ability to get the
data both in and out, I'd be on my way.

I'm asking for suggestion on the best way to get this job done. I'm
assuming responses with be go with the DataGrid, but it looks as if
theres a bunch of coding with it.

What's your recommendation? Point to good examples.

Thanks,

Hexman

Dec 26 '05 #3
On Mon, 26 Dec 2005 11:14:26 +0100, "Cor Ligthert [MVP]"
<no************ @planet.nl> wrote:
Hexman,

The datagrid needs mostly less code than a CLB

http://www.vb-tips.com/default.aspx?...3-a3539697edbd

This is not exactly the sample for your problem.

However in my opinion is adding and extra dataview to the datatable with as
rowfilter the boolean column true, makes that you are almost there.

I hope this helps,

Cor


Cor,

Yes, it does help. I am doing a small test to see how to manipulate
the DataGrid (dgTrans) and its columns. The code I have in my form
load event is:

Dim dt As New DataTable("Work Orders")

Dim colStatus As New Data.DataColumn
Dim colWO As New Data.DataColumn
Dim colEmployee As New Data.DataColumn

dgTrans.TableSt yles(0).GridCol umnStyles(0).Wi dth = 40
dgTrans.TableSt yles(0).GridCol umnStyles(1).Wi dth = 80
dgTrans.TableSt yles(0).GridCol umnStyles(2).Wi dth = 25

dt.Columns.Add( colStatus)
dt.Columns.Add( colWO )
dt.Columns.Add( colEmployee )

dt.Columns(0).C olumnName = "Status"
dt.Columns(1).C olumnName = "Work Order"
dt.Columns(2).C olumnName = "Employee"

dt.Rows.Add(New Object() {"Open", "WO123123", "Hexman"})
dt.Rows.Add(New Object() {"Open", "WO123234", "S. Jones"})
dt.Rows.Add(New Object() {"QA", "WO123345", "B. Daley"})
dt.Rows.Add(New Object() {"Closed", "WO123456", "K. Genns"})
dt.Rows.Add(New Object() {"Open", "WO123567", "Superman"} )

dgTrans.DataSou rce = dt
---------------------------------------------------------------------------------------------------------------------

It works almost as intended. I can't seem to change the width of the
individual colums of the DataGrid. I just want to insure that
initially showed is enough info in each column so the user doesn't
have to resize each column. It appears that the same width size is
used for all columns (coming from dgTrans.Preferr edColumnWidth =
40???). Maybe I have to issue some sort of resize command or such
after using the above code??

Where is a good on-line source for reading up on the DataGrid and
changing its attributes (including columns)? Usually when I Google
search, I get quite a few references/examples, but they are frequently
in ASP.net, C#, etc. and really I'd like VB.Net examples.

Thanks for all your help,

Hexman.
Dec 26 '05 #4
Hexman,

AFAIK is the information you are looking for as well on our website. It
started as a Datagrid website.

Cor
Dec 27 '05 #5

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

Similar topics

1
4722
by: Chibi | last post by:
Hello! I'm back again with another problem. First of all, thank you to Jacob for helping me understand a bit more about NNTP commands. So now the problem: I have a collection of potentially thousands of items. I
8
1795
by: Derek Martin | last post by:
Here is some code that I need help with please: Dim result As New ArrayList Try For i = 0 To objecttest1.PersonList.person_returnnumber - 1 result = objecttest1.PersonList.time_returnpunches(objecttest1.PersonList.person_getb yid(i).userid, "03/08/2004", "03/09/2004", True, False) 'The above line returns an object with several proerties, namely, a punch id that I want to be able to get out of the checkedlistbox collection:
2
2292
by: Manuel Canas | last post by:
Hi there, I'm having this dilema with a checkedlistbox. I have an array of items in there, what I want to accomplish is the following; The user could check all the items in the checkedlistbox, but always have at list one item always checked. so if the user has the last item checked and he/she wants to uncheck it, the item should reset it self to a checked state
0
1165
by: marcmc | last post by:
Hi, Can anybody point me in the right direction for reading up on this type of functionality? Basically I have a CheckedListBox with a number of items. As the items are checked and unchecked, I would like to update a dataset and ultimately a SQLServer parameter table.
0
1705
by: Terry Olsen | last post by:
Dim dirs() as string = Directory.GetDirectories(MyPath) CheckedListBox.DataSource = dirs CheckedListBox.Update For I as Integer = 0 To CheckedListBox.Items.Count - 1 CheckedListBox.SelectedIndex = I DoMySub(CheckedListBox.SelectedItem) Next The first line in the For loop (CheckedListBox.SelectedIndex = I) sometimes
1
2160
by: Huahe | last post by:
Hi, I have an checkedlistbox with a lot of items, so there is a vertical scrollbar in the checkedlistbox. I want to make the checkedlistbox invisible when the mouseleave event goes off. The mouseleave event goes off when I move the mouse to the scrollbar. Can someone explain this to me? Isn't the scrollbar a part of the checkedlistbox? -- Huahe
3
24827
by: BostonNole | last post by:
Does anyone know how to get the checkedlistbox to display items horizontally on a windows form? It seems that it only displays its check box items vertically (up and down), which is not what I want. I want to be able to use the CheckedListBox to display the days of the week going across (horizontally) a windows form. Thanks.
6
6931
by: Steve Teeples | last post by:
Can someone show me an example of how to place a "CheckedListBox" property within a PropertyGrid? -- ----------- Thanks, Steve
1
5334
by: John | last post by:
Is there a way to make the font for the selected item(s) bold in a CheckedListBox? Thanks, John
1
8551
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7386
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6198
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5664
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4368
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2771
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 we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1775
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.