Viewing DataGridBoolColumn

Hmm, i have added a column to my dataset.

    Friend WithEvents dsHistoricViewCol As System.Data.DataColumn
    Friend WithEvents dgtbHistoricViewColStyle As System.Windows.Forms.DataGridBoolColumn

When i do construct a row, i can access to my column:
 nr.Item("View") = False

But when i try resizing i get a non instancied object:
           dgHistoric.TableStyles("HistoricTable").GridColumnStyles("View").Width = 100
   
Adding the column (named dsHistoricVewCol)...

        Me.HistoricTable.Columns.AddRange(New System.Data.DataColumn() {Me.dsHistoricDateCol,Me.dsHistoricHourCol, Me.dsHistoricRespCol, Me.dsHistoricViewCol})
        Me.HistoricTable.TableName = "HistoricTable"

Adding the column TableStyle to list...

        Me.HistoricTableStyle.GridColumnStyles.AddRange(New System.Windows.Forms.DataGridColumnStyle() {Me.dgtbHistoricDateColStyle, Me.dgtbHistoricHourColStyle, Me.dgtbHistoricRespColStyle, Me.dgtbHistoricViewColStyle})


Standart column table style defenition
        'dgtbHistoricViewColStyle
        '
        Me.dgtbHistoricViewColStyle.Alignment = CType(resources.GetObject("dgtbHistoricViewColStyle.Alignment"), System.Windows.Forms.HorizontalAlignment)
        Me.dgtbHistoricViewColStyle.FalseValue = False
        Me.dgtbHistoricViewColStyle.HeaderText = resources.GetString("dgtbHistoricViewColStyle.HeaderText")
        Me.dgtbHistoricViewColStyle.MappingName = resources.GetString("dgtbHistoricViewColStyle.MappingName")
        Me.dgtbHistoricViewColStyle.NullText = resources.GetString("dgtbHistoricViewColStyle.NullText")
        Me.dgtbHistoricViewColStyle.NullValue = CType(resources.GetObject("dgtbHistoricViewColStyle.NullValue"), Object)
        Me.dgtbHistoricViewColStyle.TrueValue = True
        Me.dgtbHistoricViewColStyle.Width = CType(resources.GetObject("dgtbHistoricViewColStyle.Width"), Integer)
        '


So coming back to my initial question, why cant I see the datagridboolcolumn ?
TheSonicsAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

TheSonicsAuthor Commented:
Hmm, looks like it was a Visual Studio bug, the resource files has not been updated and the mapping name of my columnStyle was ViewCol instead of View.
0
Bob LearnedCommented:
1) What are the values for MappingName and Width?

2) Did you set the MappingName for the DataGrid table style?

Bob
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TheSonicsAuthor Commented:
Well thanks man, it's now working. Dunno why but the UI Editor for the boolcolumn bugged and saved the wrong mappingName.

Thanks a lot for your help and the file you dropped.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.