Click here to Skip to main content
11,706,979 members (54,080 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB9.0
Hi to all
I want to put mask in the first column in my datagrid so it looks like
XX X X
I have try the above code without success.....

Any help is accepted!!!
My code is this
Private Sub Fill_List()
    Try
        cmd = New OleDbCommand(Master_RollerSQL, con)
        If con.State = ConnectionState.Closed Then con.Open()
        da = New OleDbDataAdapter(cmd)
        ds = New DataSet()
        da.Fill(ds, "master_roller")
        Master_Roller_DataGrid.DataSource = ds.Tables("master_roller")
        Master_Roller_DataGrid.Columns(0).Visible = False
        Master_Roller_DataGrid.Columns(1).HeaderText = "CODE"
        Master_Roller_DataGrid.Columns(1).Width = 50
        Master_Roller_DataGrid.Columns(1).DefaultCellStyle.Format = ("##_#_#")
        Master_Roller_DataGrid.Columns(2).HeaderText = "LINE"
        Master_Roller_DataGrid.Columns(2).Width = 70
        Master_Roller_DataGrid.Columns(3).HeaderText = "TYPE"
        Master_Roller_DataGrid.Columns(3).Width = 130
        Master_Roller_DataGrid.Refresh()
        con.Close()
    Catch ex As Exception
        MsgBox(ex.Message, MsgBoxStyle.Critical, Me.Text)
    End Try
    Current_Click = -1
End Sub
Posted 22-Dec-12 10:08am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 145
1 OriginalGriff 141
2 chainerlt 110
3 Maciej Los 80
4 ppolymorphe 79
0 OriginalGriff 9,178
1 Sergey Alexandrovich Kryukov 8,512
2 CPallini 5,189
3 Maciej Los 4,766
4 Mika Wendelius 3,696


Advertise | Privacy | Mobile
Web02 | 2.8.150819.1 | Last Updated 22 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100