473,804 Members | 3,178 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

.NET & DataGridView

Rob
Dear All,

I am having a few issues with DataGridViews. Here is what I have. In a
windows form I have added a DataGridView. My data is stored in an array of
instances of a class with several properties. Then I simply set the data
source property of the DataGridView to that array. The data is displayed but
there are a few issues:

1) The container is not the same size as the actual area occupied by the
data that is visualized. For instance the data visualized is narrower then
the container. I would like the columns to occupy the whole width of the
container.

2) There are more rows then can be displayed but I do not get a scroll bar
to go down to the other rows.

3) How can I manually set the width of a column?

4) How can I make one of my columns showing links? Note, for my data source
I have an array of instances of a class that exposes a property called Url
that is the actual URL I point to. This property returns a string and right
now the DataGridView displays it as such.

5) Even better I would like on property to be the URL and another property
to be the text that represents that URL. So for instance the property
"WhereAmI" returns "Alaska" and the property "Url" returns www.alaska.com.
Now one column of the datagridview shows "Alaska" and clicking on it would
bring me to www.alaska.com.
6) How can I change the order of the columns? DataGridView seems to display
the columns in some consistent but arbetrary way.

Thanks,
Rob
Jul 21 '05 #1
2 1831
Rob,

Did you know that there is a newsgroup for beta testing.
http://communities.microsoft.com/new...idbey&slcid=us

Probably not that active because the new Beta version is scheduled.

I hope this helps?

Cor
Jul 21 '05 #2
Rob
Cor,

Thanks for the reply. I have asked there and hope I'll get an answer.

Rob

"Cor Ligthert" <no************ @planet.nl> wrote in message
news:#2******** ******@TK2MSFTN GP09.phx.gbl...
Rob,

Did you know that there is a newsgroup for beta testing.
http://communities.microsoft.com/new...idbey&slcid=us
Probably not that active because the new Beta version is scheduled.

I hope this helps?

Cor

Jul 21 '05 #3

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

Similar topics

1
2177
by: Rob | last post by:
Dear All, I have a class that exposes a few properties. These properties are used in a DataGridView. The code for that is shown bellow. The problem is that I also need to show data/columns/properties in the DataGridView that are not known at compile time. The total number of these data/columns/properties is also not known. So the question is how can I dynamically add properties (indexers don't seem to work) so that DataGridView can show...
1
1534
by: Irfan | last post by:
hi, all In VB 2005 Beta i cant find dataGrid control in the toolbox, instead DataGridView is available. What is the differance between the two ? How can i get dataGrid Control? Thanks
2
323
by: Rob | last post by:
Dear All, I am having a few issues with DataGridViews. Here is what I have. In a windows form I have added a DataGridView. My data is stored in an array of instances of a class with several properties. Then I simply set the data source property of the DataGridView to that array. The data is displayed but there are a few issues: 1) The container is not the same size as the actual area occupied by the data that is visualized. For...
1
3147
by: Joaquin | last post by:
OK, I hate myself for asking this, it's the worst question I have ever asked but it's worse not to ask: ¿How do I update a datatable in vs 2005? I mean, I am using a typed dataset, a datagridview control and SQL express. I tried this code on a separate button to commit changes to the database: Private Sub cmdOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdOK.Click If Not Me.DataSet.DataTable.GetChanges...
3
3782
by: ShaneO | last post by:
Is there a way to discover the starting X & Y position (in Pixels) of a Cell within a DataGridView control on a Windows Form? (VS2005) I've searched everywhere, and tried everything I can think of, but can't seem to find the answer. Thanks for any help. ShaneO
1
6955
by: Dave | last post by:
I have a table with 3 fields of which the primary key is a autonumber. I have created my dataadapter, dataset and datagridview using a wizard. However, in the datagrid, the update and delete operation work but the Insert will not work. I know I to make changes to code but it does not seem to work. portion of the error reads: The following exception occurred in the DataGridView: System.Data.NoNullAllowedException: Column 'ID' does not...
3
2490
by: Mike | last post by:
Dear group, I'm currrently investigating a bug within a piece of our software whereby if a DataGridView (bound directly to a DataTable) is ordered by column headers (containing lookup combo boxes where the value is the foreign key of another table), although the DataGridView is ok, the DataTable becomes out of sync. In other words, I have a Grid of customers, and if a customer name column header is clicked - the data moves in the...
2
1051
by: Warex | last post by:
Hello I am having a problem with using the datagrid. I am attaching my data through a dataset via code to a datagridview.datasource. All if fine except if I make any changes to the datagrid the changes never reflect in the database. Does anybody have a sample/example of how to use the datagridview with code not the wizard? thanks
0
1979
by: AKIAKI | last post by:
Hello. I wish TreeView & DataGridView were synchronized. (Same row is Selected and Selected Row is equal high ) I set DataGridView & TreeView on Split Container. When TreeView does not have Horizontal scroll and DataGridView has Horizontal scroll, The displayed number of items is different. please tell me Method of displaying horizontal scroll in Treeview.
0
9706
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10583
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10323
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
10082
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9160
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
7622
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
5525
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
5654
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3822
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.