This is a migrated thread and some comments may be shown as answers.

Hide column on button add popup

0 Answers 40 Views
Grid
This is a migrated thread and some comments may be shown as answers.
AName
Top achievements
Rank 1
AName asked on 06 Jun 2017, 07:59 PM

I have a radgrid which holds a table to be modified by the user.

The columns are ID (hidden as its the identity in the table), Name, Phone number, Address etc.

When I click the btnAdd button, i get the popup and it shows ID, Name and Phone number, Address etc.

All good, but I want to hide the ID, so the user cannot insert a value.  

For the grid itself I use 

    Private Sub dgGrid_ColumnCreated(sender As Object, e As GridColumnCreatedEventArgs) Handles dgGrid.ColumnCreated
        If e.Column.UniqueName <> "Actions" AndAlso e.Column.UniqueName <> "EditColumn" Then
            If e.Column.UniqueName = "ID" Then
                e.Column.Display = False
                Exit Sub
            End If

...

 

     

No answers yet. Maybe you can help?

Tags
Grid
Asked by
AName
Top achievements
Rank 1
Share this question
or