Checkbox item not returning consistent values

2 posts, 0 answers
  1. Rajesh
    Rajesh avatar
    4 posts
    Member since:
    Jan 2012

    Posted 24 Apr 2012 Link to this post

    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

     

  2. Nikolay
    Admin
    Nikolay avatar
    1805 posts

    Posted 24 Apr 2012 Link to this post

    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 >>
Back to Top