Bonsoir,
Je cherche à masquer une colonne nommée ID dans mon dataview puis datagridview.
Voici mon code :
merci de votre aide.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 'affichagedtv Dim objDataView As New DataView Dim strChampASCDESC As String 'Dim strFiltre As String strChampASCDESC = "ID DESC" 'strFiltre = "NomDeLaConne1 = *'" & TaTextBox.Text & "'*" With objDataView .Table = ObjetDataSet.Tables("MI") ' Ordre du trie de la vue filtrée, type string. ' ASC" ASC = Trie croissant, DESC Trie décroissant .Sort = strChampASCDESC ' Trie de la vue filtrée, type string. '.RowFilter = strFiltre End With Form1.DataGridView1.DataSource = objDataView
eric
Un débutant qui débute
Partager