Lasse,
You can do this with any grid control, but you will have to write some
code.
To make it non-editable, you can set the ReadOnly property to true.
In order to click on one row and have it open a form, you would handle
the double click event handler. Once you have that, you can get the
currently selected row, and then use the indexer to get the value of the
column that you want to pass to your form constructor (or to your object, or
whatever routine you use). Of course, then you call your routine that
performs some action based on the value.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Lasse Edsvik said:
hmm, almost....
is it possible to make it non-editable?
goal is that I should just click on one row and it opens a form with the
data for that product that is editable.
not sure if that's possible, not sure how to get the current ProductID (in
my case) for the row i clicked on
message news:
[email protected]...
Lasse,
Have you tried the DataGrid? It will give you exactly what you want.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)
Hello
Im wondering if there is some control in VS similar to listbox, im getting
data from a database and i would like to present it like this:
Col1 Col2 Col3
1 A B
2 C D
3 E F
were each "row" is "selectable" and the Col1-3 end up as headlines
/Lasse