I have an application (winforms, c#) that displays data in a Listview in a very usual way - the first row is headers, the first column in each row is header and the following sub-items is the data itself.
I want the first column (the headers columns) always visible and the horizontal scroll to affect the other columns only.
i don't think it is possible in winforms listview (am i wrong?). Hence, i'm thinking to split the listview to two listviews - one for headers and the second for data. In that case, i need to connect the vertical scroll bars - a task which i find to be harder than i've expected.
Am i taking a wrong path (e.g. would it be easier to use a different control)? If not, any pointers on how to implement it?
Note: Winforms Listview has poor API (e.g. no scrolling event) and is known as buggy, so i'm looking a working sample rather than MSDN links...
Thanks
As already noted the DataGridView supports this behaviour, but nobody told how this will be done:
To enable this feature simply set the Frozen
property of a column. Further informations can also be found in this How to: Freeze Columns in the Windows Forms DataGridView Control.
I think you have to try to use the DatagridView instead of the listbox. As far as I know, the DataGridView supports this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With