Data Grid WinForms Control Create data gird view in C# with modern user interface for your Windows Forms applications Pin and Unpin C# Grid Columns
The Kettic Data Grid control provides the support of column pinning and unpinning. It is really easy to pin and unpin the columns while using the Data Grid control. The pinned columns will be anchored to the left or right side of the grid. The DataGrid Controls for Windows Forms applications are an amazing component for design modern user interface. This cool control provides large flexibility to meet any critical requirements of applications nowadays. Furthermore, the DataGrid View control also provides data presentation, data refresh, data entry, data analysis, codeless development and hardcore coding functionalities. The following is a C# tutorial that shows how to create gird in Windows Forms project to present tables. Pin Specific Column
To pin a specific column to grid, the Kettic Data Grid control provides two properties to achieve this. They properties and the C# code are shows following.
- IsPinned, this property is used to pin the column to the left side of the grid when its value is true
- PinPlace, this property is used to change the place where the specific column will be pinned by selecting a value from the enumeration.
ketticGrid.Columns[2].IsPinned = true; ketticGrid.Columns["FirstName"].IsPinned = true;
Pin Multiple Columns
To pin multiple columns to grid, we need to set the IsPinned property or the PinPlace property for the entire columns that will be pinned. The following C# code shows how to pinned multiple columns programmatically. ketticGrid.Columns["Pictures"].PinPlace = Kettic.WinForms.UI.PinnedColumnPlace.Left; ketticGrid.Columns["FirstName"].PinPlace = Kettic.WinForms.UI.PinnedColumnPlace.Left; ketticGrid.Columns["LastName"].PinPlace = Kettic.WinForms.UI.PinnedColumnPlace.Left;
|