Click here to Skip to main content
15,886,795 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have a Binding Source that has a DataSource of a Class and then my DataGrid's datasource is the Binding Source.

Code looks like this.

VB
Private _DashboardBindingSource as new BindingSource

_DashboardBindingSource = BrianRecords.Values
DataGridView.DataSource = _DasboardBindingSource


My DataGrid has numerous columns. The ones I am interested are Status and Select.

Status can contain 4 status (Loaded, Validate, Change, Awaiting)

The select column is a checkbox field.

I want to enable the checkbox for every row that has a status of Loaded or Change, however, disable the checkbox on each row where the status is Validate or Awaiting.

Is anyone able to help or point me in the right direction?

Thanks

McCrimmon
Posted
Comments
CHill60 9-Feb-13 17:22pm    
Do you have a LoadingRow Event available with your version? Or (I think) the ItemDataBound event?
Maciej Los 11-Feb-13 17:23pm    
I'm not sure what you exactly want to do, but it seems to be easy:
CheckBox.Enabled=(Status = "Loaded" OR Status = "Change")

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900