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

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 5504
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.com...
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("WorkOrders")

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

dgTrans.TableStyles(0).GridColumnStyles(0).Width = 40
dgTrans.TableStyles(0).GridColumnStyles(1).Width = 80
dgTrans.TableStyles(0).GridColumnStyles(2).Width = 25

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

dt.Columns(0).ColumnName = "Status"
dt.Columns(1).ColumnName = "Work Order"
dt.Columns(2).ColumnName = "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.DataSource = 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.PreferredColumnWidth =
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
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...
8
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 =...
2
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...
0
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,...
0
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...
1
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...
3
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...
6
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
by: John | last post by:
Is there a way to make the font for the selected item(s) bold in a CheckedListBox? Thanks, John
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: 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...
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
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...

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.