Customizing Coloumns in DataGridView in VS 2008
-
Hello Everybody, Hope all are doing well. I have an application where I have to show data in a gridview. I want that when user scroll the horizontal scrollbar first 3 columns should not be scrolled i.e. first 3 columns should always shown like we shown the header of the gridview to the user always at the time of vertical scrolling. Like this also I want a row in the bottom should always shown to the user(it could be the footer).Plz send me the sample if u have otherwise tell me how to achieve this. Thanks in Advance. Happy Coding!!!!!!
A key to every Solution
-
Hello Everybody, Hope all are doing well. I have an application where I have to show data in a gridview. I want that when user scroll the horizontal scrollbar first 3 columns should not be scrolled i.e. first 3 columns should always shown like we shown the header of the gridview to the user always at the time of vertical scrolling. Like this also I want a row in the bottom should always shown to the user(it could be the footer).Plz send me the sample if u have otherwise tell me how to achieve this. Thanks in Advance. Happy Coding!!!!!!
A key to every Solution
Both the DataGridViewColumn and DataGridViewRow classes expose a Frozen property that does this. All you have to do is set the Frozen property of the columns you want not to scroll.
myDGV.Columns(0).Frozen = True
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008