This is a migrated thread and some comments may be shown as answers.

Checkbox item not returning consistent values

1 Answer 78 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rajesh
Top achievements
Rank 1
Rajesh asked on 24 Apr 2012, 12:20 PM
Hi,

I have a checkbox control in Grid and it is not returning consistent values sometimes it is returning On/Off instead of True/False.
This scenario is rare not coming frequently.

I would be looking , it should return True/False always.

What I am using in code

 

Private Sub rdgrdvSeachAddUpt_CellBeginEdit(ByVal sender As System.Object, ByVal e As Telerik.WinControls.UI.GridViewCellCancelEventArgs) Handles rdgrdvSeachAddUpt.CellBeginEdit

 

 

Dim lobjMessage As New Message

 

 

Try

 

 

''Check if it is a checkbox control in grid

 

 

Dim chEditor As RadCheckBoxEditor = TryCast(e.ActiveEditor, RadCheckBoxEditor)

 

 

If chEditor IsNot Nothing Then

 

 

If e.Column.Name = "radchkDelete" Then

 

 

'If yes check/uncheck checkbox item..it is for delete column

 

 

Dim isChecked As Boolean = Convert.ToBoolean(chEditor.Value)

 

rdgrdvSeachAddUpt.CurrentRow.Cells(

"radchkDelete").Value = Not isChecked

 

 

End If

 

 

End If

 

 

 

Catch objEx As Exception

 

Logger.Log(objEx, lobjMessage)

UIHelper.ShowMessage(lobjMessage)

 

Finally

 

lobjMessage =

Nothing

 

 

End Try

 

 

End Sub

 

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 24 Apr 2012, 03:57 PM
Hello Rajesh,

You can find the answer to your question in your support ticket. I am pasting the answer here in case somebody else is interested in the topic:
Generally speaking, the editor should always return values of one and the same type. In addition, actually the RadCheckBoxEditor should return On/Off instead of True/False and I was not able to reproduce a case where it returns True/False. Therefore, I would kindly ask you to provide a sample project and steps that I should follow in order to reproduce the issue. This will allow me to assist you further.

Kind regards,
Nikolay
the Telerik team
RadControls for WinForms Q1'12 release is now live! Check out what's new or download a free trial >>
Tags
GridView
Asked by
Rajesh
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or