hi,
i have some code like this
For i = 0 To count Dim col1 As CheckedListBox.CheckedItemCollection = chk_Sorumlular.CheckedItems Dim col2 As CheckedListBox.CheckedItemCollection = chk_Beyannameler.CheckedItems If col1.Contains(Me.Izgara.Rows(i).Cells(Me.sutun_sorumlu.Name).Value) And col2.Contains(Me.Izgara.Rows(i).Cells(Me.sutun_Turu.Name).Value) Then Dim str As String = Me.Izgara.Rows(i).Cells(Me.sutun_ID.Name).Value.ToString() Dim chrArray() As Char = {"|"c} If (Microsoft.VisualBasic.CompilerServices.Operators.CompareString(str.Split(chrArray)(1).Trim(), "", False) <> 0) And chk_TahakkukFisi.Checked Then Me.Izgara.Rows(i).Cells(Me.sutun_Sec_Tahakkuk.Name).Value = CheckState.Checked Else Me.Izgara.Rows(i).Cells(Me.sutun_Sec_Tahakkuk.Name).Value = CheckState.Unchecked End If If (Microsoft.VisualBasic.CompilerServices.Operators.CompareString(str.Split(chrArray)(0).Trim(), "", False) <> 0) And chk_Beyanname.Checked Then Me.Izgara.Rows(i).Cells(Me.sutun_Sec_Beyanname.Name).Value = CheckState.Checked Else Me.Izgara.Rows(i).Cells(Me.sutun_Sec_Beyanname.Name).Value = CheckState.Unchecked End If Else Me.Izgara.Rows(i).Cells(Me.sutun_Sec_Tahakkuk.Name).Value = CheckState.Unchecked Me.Izgara.Rows(i).Cells(Me.sutun_Sec_Beyanname.Name).Value = CheckState.Unchecked End If Application.DoEvents()Next
i can do this with microsoft checkedlistbox component
but i try do with radcheckedlistbox and get error
An unhandled exception of type 'System.InvalidCastException' occurred in asd.exe
Additional information: An object of type 'System.String' could not be thrown to 'Telerik.WinControls.UI.ListViewDataItem'.
how can i fix this
thank you
