Improve company productivity with a Business Account.Sign Up


Lost datarid grey selector?

Posted on 2004-10-26
Medium Priority
Last Modified: 2010-04-17
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


            '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

            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

            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
            End With

            'add new style

Question by:Nerdy_Girl88
LVL 19

Accepted Solution

arif_eqbal earned 2000 total points
ID: 12409202
This is the problem

dgtOptionstyle.RowHeadersVisible = False

It hides your Row Header
Set it to True

dgtOptionstyle.RowHeadersVisible = True


Author Comment

ID: 12409226
You are completely RIGHTm thank you, i was trying al sorts of FAR out therories,



Featured Post

What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Article by: Shaun
Tiling windows is a great way to see multiple applications at once. Windows Tiler is a tool that automatically tiles open application windows as the open and close.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Loops Section Overview

602 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question