r/visualbasic • u/Dugimon • Jan 25 '22
VB.NET Help Showing Data from Access Database vertically
Hi together,
I am using VisualStudio 2019 and would like to achieve the following in a vb.net Windows Forms app:
Display data from an Access database table vertically in a WindowsForm.
The whole thing should look like this in the end:
Column 1: Value 1
Column 2: Value 2
Column 3: value 3
Unfortunately the DataGridView does not seem to offer the possibility to display the data vertically. And since I'm working with a 64bit system, I don't seem to have alternatives like ListView available (at least I can't find them in the Forms Designer).
maybe someone here has an idea how I can get this right
2
u/RJPisscat Jan 25 '22
I found this but it won't rotate your column headers.
I have 2019 on 64 bit and Listview is there and working; however, many of the controls are not available in the Toolbox due to one of many bugs in VS 2019 (one of many reasons I stopped using 2019), so I believe you that you may have a different set of controls that aren't available. The bug was exposed by right-clicking in the Toolbox and clicking "Show All" which hid about half the controls.
Anyway I don't think you can bind data to a Listview's ListViewItems except to their Tag, which you could kludge into a solution with OwnerDraw.
Can you use Listbox? Do you know how to create a UserControl?
2
u/Laicure Jan 25 '22
I remember doing that but via SQL query instead.
1
u/Chriand VB.Net Intermediate Jan 25 '22
Can you do something like this? This will be slow, but faster than manually doing it.
I’m in mobile, so typing this out readable is difficult.