.NET & DataGridView

R

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top