Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
The data grid is troubling me....
Message
De
08/03/2002 16:04:23
 
 
À
08/03/2002 15:15:17
Kishor K
KPIT Cummins Infosystems Ltd.
Pune, Inde
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00630370
Message ID:
00630404
Vues:
23
here is some code to customize grid columns. As far as adding checkboxes and comboboxes, I am not sure. I got a class off of gotdotnet to add a combobox, but it didn't seem to work right. The valuemember always showed up in the grid instead of the displaymember. I would like to see how it is supposed to work too. Anyway, below is the code to customize grid columns.
    Private Sub AddCustomDataStyle()
        Dim Ts1 As New DataGridTableStyle()
        Ts1.MappingName = "Employee"

        Dim grdColStyleA As New DataGridTextBoxColumn()

        grdColStyleA.Width = 0
        grdColStyleA.MappingName = "EmployeeID"
        grdColStyleA.HeaderText = "ID"
        Ts1.GridColumnStyles.Add(grdColStyleA)

        grdColStyleA = New DataGridTextBoxColumn()
        grdColStyleA.Width = 152
        grdColStyleA.MappingName = "strEmployeeName"
        grdColStyleA.HeaderText = "Employee Name"
        Ts1.GridColumnStyles.Add(grdColStyleA)

        grdColStyleA = New DataGridTextBoxColumn()
        grdColStyleA.Width = 75
        grdColStyleA.MappingName = "strEmployeeNumber"
        grdColStyleA.HeaderText = "Emp. Number"
        Ts1.GridColumnStyles.Add(grdColStyleA)

        grdColStyleA = New DataGridTextBoxColumn()
        grdColStyleA.Width = 75
        grdColStyleA.MappingName = "strEmployeeCode"
        grdColStyleA.HeaderText = "Emp. Code"
        Ts1.GridColumnStyles.Add(grdColStyleA)

        grdColStyleA = New DataGridTextBoxColumn()
        grdColStyleA.Width = 86
        grdColStyleA.MappingName = "strEmployeePassword"
        grdColStyleA.HeaderText = "Password"
        Ts1.GridColumnStyles.Add(grdColStyleA)

        Me.DataGrid1.TableStyles.Add(Ts1)
    End Sub
Randy Belcher
AFG Industries, Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform