Solved

Lost datarid grey selector?

Posted on 2004-10-26
244 Views
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

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


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
Question by:Nerdy_Girl88
    2 Comments
     
    LVL 19

    Accepted Solution

    by:
    This is the problem

    dgtOptionstyle.RowHeadersVisible = False


    It hides your Row Header
    Set it to True

    dgtOptionstyle.RowHeadersVisible = True



    0
     

    Author Comment

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

    thanks

    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
    If you’re thinking to yourself “That description sounds a lot like two people doing the work that one could accomplish,” you’re not alone.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

    933 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

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now