Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

Lost datarid grey selector?

Hi, i have made a datargrid table style and add it to my datagirid, but now i can't see my grey selector area down the side of my datagrid.

Here is the code for my datagrid....What am i missing

-----------------------------------------


Try
            'set the dataSource for the Option datagrid Combobox
            dvOptionCBO = Me.mDataObj.FillModelOptionsDataView

            dgtOptionstyle.MappingName = "Quote_Option"
            dgtOptionstyle.RowHeadersVisible = False
            dgtOptionstyle.AllowSorting = False
            dgtOptionstyle.HeaderBackColor = Color.Navy
            dgtOptionstyle.HeaderForeColor = Color.White
            dgtOptionstyle.HeaderFont = New System.Drawing.Font("Microsoft Sans Serif", 9.0F, FontStyle.Bold, GraphicsUnit.Point, 0)

            dgtOptionstyle.GridLineColor = Color.DarkGray

            'first col 'QuoteAccessoryID
            Dim col1 As New DataGridTextBoxColumn
            With col1
                .MappingName = "QuoteOptionID"
                .HeaderText = "QuoteOptionID"
                .Width = 0
            End With

            'QuoteOptionID
            Dim col2 As New DataGridTextBoxColumn
            With col2
                .MappingName = "QuoteModelID"
                .HeaderText = "QuoteModelID"
                .Width = 0
            End With

            'Third col (combo)'Option ID
            Dim cboOption As New DataGridCombobox.DataGridComboBoxColumn
            With cboOption
                .MappingName = "OptionID"
                .HeaderText = "Option"
                .Alignment = HorizontalAlignment.Left
                .Width = 100
                .NullText = String.Empty
                .ColumnComboBox.DataSource = dvOptionCBO
                .ColumnComboBox.DisplayMember = "Model_Option_ID"
                .ColumnComboBox.ValueMember = "Model_Option_ID"
            End With

            'Purchase
            Dim col3 As New DataGridTextBoxColumn
            With col3
                .MappingName = "Purchase"
                .HeaderText = "Purchase"
                .TextBox.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0F, FontStyle.Bold, GraphicsUnit.Point, 0)
                '.Alignment = HorizontalAlignment.Right
                .NullText = "$0.00"
                .Format = "C"
                .Width = 0
            End With

            '12 Months
            Dim col4 As New DataGridTextBoxColumn
            With col4
                .MappingName = "12Months"
                .HeaderText = "12 Months"
                .Format = "C"
                .Width = 0
            End With

            '24 Months
            Dim col5 As New DataGridTextBoxColumn
            With col5
                .MappingName = "24Months"
                .HeaderText = "24 Months"
                .Format = "C"
                .Width = 0
            End With

            '36 Months
            Dim col6 As New DataGridTextBoxColumn
            With col6
                .MappingName = "36Months"
                .HeaderText = "36 Months"
                .Format = "C"
                .Width = 0
            End With

            '48 Months
            Dim col7 As New DataGridTextBoxColumn
            With col7
                .MappingName = "48Months"
                .HeaderText = "48 Months"
                .Format = "C"
                .Width = 0
            End With

            '60 Months
            Dim col8 As New DataGridTextBoxColumn
            With col8
                .MappingName = "60Months"
                .HeaderText = "60 Months"
                .Format = "C"
                .Width = 0
            End With

            With dgtOptionstyle.GridColumnStyles
                .Add(cboOption)
                .Add(col1)
                .Add(col2)
                .Add(col3)
                .Add(col4)
                .Add(col5)
                .Add(col6)
                .Add(col7)
                .Add(col8)
            End With

            'add new style
            Me.dgrOption.TableStyles.Clear()
            Me.dgrOption.TableStyles.Add(dgtOptionstyle)
------------------------------------------------------------------

Thanks
Nerdy_Girl
0
Nerdy_Girl88
Asked:
Nerdy_Girl88
1 Solution
 
arif_eqbalCommented:
This is the problem

dgtOptionstyle.RowHeadersVisible = False


It hides your Row Header
Set it to True

dgtOptionstyle.RowHeadersVisible = True



0
 
Nerdy_Girl88Author Commented:
You are completely RIGHTm thank you, i was trying al sorts of FAR out therories,

thanks

0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now