سؤال

I am creating some controls in a table runtime and adding them to List(Of T) for using them in future. Now I want to change the backcolor of the table's column which contains ImageList(x). Here ImageList() is a list of Images. But when I try to change the backcolor of the table's column i.e. parent of imagelist(x) it says backcolor is not a member of system.web.ui.control.

Here is the code

For x As Integer = 0 To FileImageList.Count - 1
            If sender.id.substring(3) = FileImageList(x).ID.Substring(3) Then
                FileNameList(x).Parent.backcolor = Drawing.Color.Green
            End If
        Next

What might be the problem? Does anybody know?

هل كانت مفيدة؟

المحلول

I changed the type of Imagelist() to Object and it works fine. No errors.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top