Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Looking for a datagrid to select rows

Status
Not open for further replies.

RedLion

Programmer
Sep 13, 2000
342
NL
Hello,

What I would like to have is a datagrid component / code to select a row. I am aware of the fact that for that kind of functionality you normally use a datalist. But I would like to have the functionality of sorting the data, and having column headers. The component should display all kind of file information like filenames, paths, type from a dataset. It is for a WinForm. Having all functionality as the windows-explorer grid like detail view, listview would be very great. It's not necessary that its a free component / code. All grids I found till now are edit grids, while the grid I'm looking for should be readonly. When a row is selected it should be highlighted someway.


I'm also looking for a second component, it should preview the file selected like the desktop search tool from MSN?

Any ideas?

Thanks in advance,

Charl
 
Have you thought about using 3rd party components? The commercial solution is to use Developer Express XtraGrid suite which does the job nicely but your looking at a cost.

There are some open source solutions like SourceGrid which do what your after and could be modified to suit your needs.

Google for:

C# grid component sorting column headers

Cheers,

Fz
 
Hi FZ,

It may be a commercial solution, as long as it wouldn't take me more time to use it then to write it myself.

About XtraGrid, does it also give you the oportunity to select a record/row which will be higlighted? I saw that it had a lot of functionality for data editing, but that's what it shouldn't do for this case.

Thanks,

Charl
 
With a bit of work you can make the DataGrid control do what you need. Have a look at for some good examples.

If you are using VS2005, the DataGridView is much more advanced and supports things like read only, auto row heights and auto column widths out of the box.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top