c# Hide a property in datagridview with datasource [duplicate]

If you are adding the columns yourself… don’t add the columns you don’t want.

If you have AutoCreateColumns enabled, then:

  • if it is a class-based model, add [Browsable(false)] to properties you don’t want
  • or set the column’s .Visible to false
  • or simply remove the columns you don’t want afterwards

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)