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

Grid scoll clearing checkbox and at a time it is checking only one checkbox inn grid

1 Answer 45 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Rajesh
Top achievements
Rank 1
Rajesh asked on 28 Mar 2012, 10:08 AM
Hi,

I am facing some issues in datagrid checkbox column.

1. I have crated master template an having a checkbox column e.g and it has some child template as well which i create dynamically
           GridViewCheckBoxColumn1.EnableExpressionEditor = False
            GridViewCheckBoxColumn1.FieldName = "DeleteItem"
            GridViewCheckBoxColumn1.HeaderText = "Delete"
            GridViewCheckBoxColumn1.MinWidth = 20
            GridViewCheckBoxColumn1.Name = "radchkDelete"
            GridViewTextBoxColumn4.EnableExpressionEditor = False
It is allowing me to check only one checkbox(row) at a time and when i am trying to check another checkbox(row)  it is unchecking my previous checked column..why this..?
2.I am checking one checkbox and trying to scroll horizontally ..it is clearing my checked column...why this..?
3.I am using some events like
code:
  Private Sub rdgrdvSeachAddUpt_CellEditorInitialized(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) Handles rdgrdvSeachAddUpt.CellEditorInitialized
            Dim lobjMessage As New Message
            Try

                Dim editor = TryCast(e.ActiveEditor, RadDropDownListEditor)
                If editor IsNot Nothing Then
                    Dim editorElement = TryCast(editor.EditorElement, RadDropDownListEditorElement)
                    If editorElement IsNot Nothing Then
                        If e.Column.Name = "radcmbCriteriaType" Then
                            AddHandler editorElement.SelectedIndexChanged, AddressOf editorElement_SelectedIndexChanged
                        End If
                    End If
                End If
            Catch objException As Exception
                Logger.Log(objException, lobjMessage)
                UIHelper.ShowMessage(lobjMessage)
            Finally
                lobjMessage = Nothing
            End Try
        End Sub
===============
 Private Sub rdgrdvSeachAddUpt_CellValueChanged(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewCellEventArgs) handles rdgrdvSeachAddUpt.CellValueChanged
            Dim lobjMessage As New Message
            Dim gridColNameCriteriaType As String = "radcmbCriteriaType"
            Try
                If e.Column.Name = gridColNameCriteriaType Then
                    If CInt(e.Row.Cells(gridColNameCriteriaType).Value) = CInt(enumCriteria.Morphology) Then
                        e.Row.Cells("radcmbDiagnosis").ReadOnly = False
                        e.Row.Cells("radcmbInter").ReadOnly = False
                        e.Row.Cells("radcmbCompaOpr").ReadOnly = True
                        e.Row.Cells("raddblCompValue").ReadOnly = True
                        e.Row.Cells("radcmbGender").ReadOnly = True
                        e.Row.Cells("raddblMaxAgeMonth").ReadOnly = True
                        e.Row.Cells("raddblMaxAgeYear").ReadOnly = True
                        e.Row.Cells("raddblMaxValue").ReadOnly = True
                        e.Row.Cells("cmbdblMinValue").ReadOnly = True
                        e.Row.Cells("radcmbParam").ReadOnly = True
                        e.Row.Cells("radcmbVisitType").ReadOnly = True
                        e.Row.Cells("raddblMinAge").ReadOnly = True
                        e.Row.Cells("raddblMinAgeMonth").ReadOnly = True
                        e.Row.Cells("radtxtItemStatus").ReadOnly = True
                        ''To set nothing
                        e.Row.Cells("radcmbCompaOpr").Value = Nothing
                        e.Row.Cells("raddblCompValue").Value = Nothing
                        e.Row.Cells("radcmbGender").Value = Nothing
                        e.Row.Cells("raddblMaxAgeMonth").Value = Nothing
                        e.Row.Cells("raddblMaxAgeYear").Value = Nothing
                        e.Row.Cells("raddblMaxValue").Value = Nothing
                        e.Row.Cells("cmbdblMinValue").Value = Nothing
                        e.Row.Cells("radcmbParam").Value = Nothing
                        e.Row.Cells("radcmbVisitType").Value = Nothing
                        e.Row.Cells("raddblMinAge").Value = Nothing
                        e.Row.Cells("raddblMinAgeMonth").Value = Nothing
                        ' e.Row.Cells("radtxtItemStatus").Value = Nothing

                    ElseIf CInt(e.Row.Cells(gridColNameCriteriaType).Value) = CInt(enumCriteria.BaselineRange) OrElse _
                    CInt(e.Row.Cells(gridColNameCriteriaType).Value) = CInt(enumCriteria.Range) Then
                        e.Row.Cells("radcmbDiagnosis").ReadOnly = False
                        e.Row.Cells("radcmbInter").ReadOnly = False
                        e.Row.Cells("radcmbCompaOpr").ReadOnly = True
                        e.Row.Cells("raddblCompValue").ReadOnly = True
                        e.Row.Cells("radcmbGender").ReadOnly = False
                        e.Row.Cells("raddblMaxAgeMonth").ReadOnly = False
                        e.Row.Cells("raddblMaxAgeYear").ReadOnly = False
                        e.Row.Cells("raddblMaxValue").ReadOnly = False
                        e.Row.Cells("cmbdblMinValue").ReadOnly = False
                        e.Row.Cells("radcmbParam").ReadOnly = False
                        e.Row.Cells("radcmbVisitType").ReadOnly = False
                        e.Row.Cells("raddblMinAge").ReadOnly = False
                        e.Row.Cells("raddblMinAgeMonth").ReadOnly = False
                        e.Row.Cells("radtxtItemStatus").ReadOnly = True

                        e.Row.Cells("radcmbCompaOpr").Value = Nothing
                        e.Row.Cells("raddblCompValue").Value = Nothing

                    ElseIf CInt(e.Row.Cells(gridColNameCriteriaType).Value) = CInt(enumCriteria.RangeAndBaselineComparison) Then
                        e.Row.Cells("radcmbDiagnosis").ReadOnly = False
                        e.Row.Cells("radcmbInter").ReadOnly = False
                        e.Row.Cells("radcmbCompaOpr").ReadOnly = False
                        e.Row.Cells("raddblCompValue").ReadOnly = False
                        e.Row.Cells("radcmbGender").ReadOnly = False
                        e.Row.Cells("raddblMaxAgeMonth").ReadOnly = False
                        e.Row.Cells("raddblMaxAgeYear").ReadOnly = False
                        e.Row.Cells("raddblMaxValue").ReadOnly = False
                        e.Row.Cells("cmbdblMinValue").ReadOnly = False
                        e.Row.Cells("radcmbParam").ReadOnly = False
                        e.Row.Cells("radcmbVisitType").ReadOnly = False
                        e.Row.Cells("raddblMinAge").ReadOnly = False
                        e.Row.Cells("raddblMinAgeMonth").ReadOnly = False
                        e.Row.Cells("radtxtItemStatus").ReadOnly = True
                    End If
                End If
            Catch objException As Exception
                Logger.Log(objException, lobjMessage)
                UIHelper.ShowMessage(lobjMessage)
            Finally
                lobjMessage = Nothing
            End Try
        End Sub
====================
 Private Sub rdgrdvSeachAddUpt_UserDeletingRow(ByVal sender As Object, ByVal e As Telerik.WinControls.UI.GridViewRowCancelEventArgs) Handles rdgrdvSeachAddUpt.UserDeletingRow
            Dim lobjMessage As New Message
            Try
                If String.IsNullOrEmpty(Me.rdgrdvSeachAddUpt.CurrentRow.Cells(1).Value.ToString) Then
                Else
                    e.Cancel = True
                End If
            Catch objEx As Exception
                Logger.Log(objEx, lobjMessage)
                UIHelper.ShowMessage(lobjMessage)
            Finally
                lobjMessage = Nothing
            End Try

        End Sub

====================
Can you please help me in point#1,2....

1 Answer, 1 is accepted

Sort by
0
Jack
Telerik team
answered on 30 Mar 2012, 08:34 AM
Hi Rajesh,

Thank you for contacting us.

I am not able to solve these issues without further information. Could you please a support ticket and send a sample application? This will allow me to debug and investigate the issues. I will be glad to help further.

I am looking forward to your reply.
 
Regards,
Jack
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
Jack
Telerik team
Share this question
or