How to add button in window form datagrid
-
Hi, I would like to add a button column on each row in datagrid. How should i do it? I searched the forum from google. The codes look like this: - ' Set datagrid XP Style Button ColumnStyle for City field .Add(New DataGridXPButtonColumn(SystemColors.ControlText, SystemColors.Control)) ' Also you may set datagrid Button ColumnStyle for City ' field without XP Button Style as the following: ' .Add(New DataGridButtonColumn()) With .Item(3) .MappingName = "City" .HeaderText = "City" .Width = 60 .NullText = String.Empty End With But the problem that I'm facing is, i can't add "New DataGridXPButtonColumn" or "New DataGridButtonColumn" in datagridtablestyle. There is no "datagridbuttoncolum" for me to add. It's not allow for me to do so. How should i do? Pls help..... thanks in advance. regards, eunice
-
Hi, I would like to add a button column on each row in datagrid. How should i do it? I searched the forum from google. The codes look like this: - ' Set datagrid XP Style Button ColumnStyle for City field .Add(New DataGridXPButtonColumn(SystemColors.ControlText, SystemColors.Control)) ' Also you may set datagrid Button ColumnStyle for City ' field without XP Button Style as the following: ' .Add(New DataGridButtonColumn()) With .Item(3) .MappingName = "City" .HeaderText = "City" .Width = 60 .NullText = String.Empty End With But the problem that I'm facing is, i can't add "New DataGridXPButtonColumn" or "New DataGridButtonColumn" in datagridtablestyle. There is no "datagridbuttoncolum" for me to add. It's not allow for me to do so. How should i do? Pls help..... thanks in advance. regards, eunice
Are you using the DataGrid (.NET 1.0 and 1.1) or the DataGridView (.NET 2.0 and above)?? Google results for "add button to datagridview[^]".
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007 -
Are you using the DataGrid (.NET 1.0 and 1.1) or the DataGridView (.NET 2.0 and above)?? Google results for "add button to datagridview[^]".
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007Hi Dave, I'm using DataGrid (.net 1.1) version, for vb.net window application. It doesn't have "DataGridButtonColumn" control. How can i add the button column in datagrid. Pls guide me. Thanks.