954,517 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to disable a column in data grid?

In a data grid, I have a data grid with a column like this:

Dim colAdd As New HeaderAndDataAlignColumn
        With colAdd
            .MappingName = "Address"
            .HeaderText = "Nationality"
            .Width = 150
            .Alignment = HorizontalAlignment.Center
            .TextBox.Enabled = False
            .ReadOnly = True
            .NullText = ""
        End With

How can I disable this column entirely, I mean even disable focus event (can't click, can't use Tab or arrow keys, etc.)

Eternal Newbie
Newbie Poster
20 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

Doesn't Enabled=False do that

ChrisPadgham
Posting Pro in Training
413 posts since Sep 2009
Reputation Points: 102
Solved Threads: 78
 

you can set your column readonly property true .

Regards

waqasaslammmeo
Posting Pro in Training
472 posts since Aug 2011
Reputation Points: 38
Solved Threads: 82
 

Thanks for your help, but as you could see, I had already set these as you said and... nothing happened. I wish that we could even disable Tabstop, but TabStop = False do "Nothing". I wonder if there's a way to solve this, really!!

Eternal Newbie
Newbie Poster
20 posts since Oct 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: