mardi 27 décembre 2016

Stuck with readonly =true or false

I'm a little bit stuck so i hope sombody can help me out I have the code for read only that works fine but i want somthing a little bit diffrent Here is the code :

         If Me.dvg.Columns.Contains("edit") And _
            e.ColumnIndex >= 7 Then
            If Not IsNothing(Me.dvg.Rows(e.RowIndex).Cells("edit").Value) Then
                If Me.DataGridView_Booking.Rows(e.RowIndex).Cells("edit").Value.ToString <> "True" Then
                    e.CellStyle.ForeColor = Color.FromArgb(90, 90, 90)
                    Me.dvg.rows(e.RowIndex).Cells(e.ColumnIndex).ReadOnly = True
                End If

What i actually want = if edit contains value i need to be readonly. i have a few columns with months like jan(event), jan(date),Jan(cost) until dec(event) etc. at this point im stuck i want if jan(cost) is empty then i need to have diffrent cells on read only sombody got an idea how to do that ?

Thanks !

Aucun commentaire:

Enregistrer un commentaire