samedi 7 décembre 2019

Not able to set CheckBox "Checked" in coding

I am using RadGridView from Telerik with Visual Studio 2019 with .Net 4.7

I have that grid bound to datasource, working fine. I have one unbound column at first position which is GridViewCheckBoxColumn. Based on Second cell value, I would like to set checkbox in first cell of every row to be checked. But its not working. Checkbox is non selected.

Following is code I am using

For Each laserReceiveID As String In _LASERRECEIVEID.Split(",")
    For Each row As GridViewDataRowInfo In Me.RadGridView1.Rows
        If row.Cells(1).Value.ToString = laserReceiveID Then
            row.Cells(0).Value = True
            'msgbox(row.cell(0).value) 'This line make the thing working
        End If
    Next
Next

When I put MessageBox to show value of checkbox, its working, but displaying messagebox is not atall a good idea.




Aucun commentaire:

Enregistrer un commentaire