listview vs others

  • Thread starter Thread starter Wndr
  • Start date Start date
W

Wndr

Hi guys.
I have ini file to read and to display it on Windows form in 5 columns.
I need your suggestion on what control will be better to use ListView,
DataGridView or some others.
Any help appreciated.
 
Wndr,

Well, what do you think the advantages of using a ListView over a
DataGridView would be? Anytime I hear "column", I think DataGridView (or
some other sort of data grid).
 
Thank you.
In my toolbox I could see only DataGridView, where could I get any other
GridView, and if it's possible to use DataGridView to add the data from ini
files?, because all samples I could find it's directly from the database.
And last question, do you know any samples on using DataGridView or any
GridView from the txt file or something like this.
Sorry, came from VB.

Nicholas Paldino said:
Wndr,

Well, what do you think the advantages of using a ListView over a
DataGridView would be? Anytime I hear "column", I think DataGridView (or
some other sort of data grid).

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Wndr said:
Hi guys.
I have ini file to read and to display it on Windows form in 5 columns.
I need your suggestion on what control will be better to use ListView,
DataGridView or some others.
Any help appreciated.
 
Wndr,

The DataGridView will be used the same way from C# or VB regardless,
since it's not language specific, but included in the framework (unless you
are referring to VB6).

As for using it, you can bind the data grid view into almost any data
source that implements IList. You could create an object that represents a
"row" and then populate it from your INI file (one for each "row") and then
add them to a List<T> of those objects (which implements IList) and set that
as the data source...

Either that, or you could create a DataSet with the appropriate columns
and add the data from the INI file to that, and then bind the DataGridView
to that.

For samples, a search on Google for "datagridview" and "sample" should
turn up a good deal of information.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Wndr said:
Thank you.
In my toolbox I could see only DataGridView, where could I get any other
GridView, and if it's possible to use DataGridView to add the data from
ini files?, because all samples I could find it's directly from the
database. And last question, do you know any samples on using DataGridView
or any GridView from the txt file or something like this.
Sorry, came from VB.

Nicholas Paldino said:
Wndr,

Well, what do you think the advantages of using a ListView over a
DataGridView would be? Anytime I hear "column", I think DataGridView (or
some other sort of data grid).

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Wndr said:
Hi guys.
I have ini file to read and to display it on Windows form in 5 columns.
I need your suggestion on what control will be better to use ListView,
DataGridView or some others.
Any help appreciated.
 
Thank you so much.

Nicholas Paldino said:
Wndr,

The DataGridView will be used the same way from C# or VB regardless,
since it's not language specific, but included in the framework (unless
you are referring to VB6).

As for using it, you can bind the data grid view into almost any data
source that implements IList. You could create an object that represents
a "row" and then populate it from your INI file (one for each "row") and
then add them to a List<T> of those objects (which implements IList) and
set that as the data source...

Either that, or you could create a DataSet with the appropriate columns
and add the data from the INI file to that, and then bind the DataGridView
to that.

For samples, a search on Google for "datagridview" and "sample" should
turn up a good deal of information.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Wndr said:
Thank you.
In my toolbox I could see only DataGridView, where could I get any other
GridView, and if it's possible to use DataGridView to add the data from
ini files?, because all samples I could find it's directly from the
database. And last question, do you know any samples on using
DataGridView or any GridView from the txt file or something like this.
Sorry, came from VB.

Nicholas Paldino said:
Wndr,

Well, what do you think the advantages of using a ListView over a
DataGridView would be? Anytime I hear "column", I think DataGridView
(or some other sort of data grid).

--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Hi guys.
I have ini file to read and to display it on Windows form in 5 columns.
I need your suggestion on what control will be better to use ListView,
DataGridView or some others.
Any help appreciated.
 
Wndr kirjoitti:
Hi guys.
I have ini file to read and to display it on Windows form in 5 columns.
I need your suggestion on what control will be better to use ListView,
DataGridView or some others.
Any help appreciated.

If you do not know beforehand how you will show the data, use
DataGridView. But if you know that you will need icons and checkboxes
associated with lines, ListView might be better. Also I like ListView's
group feature.
 
Back
Top