Re: Option Strict On disallows late binding
- From: Brock Allen <ballen@xxxxxxxxxxxxxxxxx>
- Date: Wed, 06 Apr 2005 10:29:51 -0700
You'll have to fix the type mismatch compiler errors and fix them. Strict Off tells VB.NET to figure it out at runtime (if possible).
-Brock DevelopMentor http://staff.develop.com/ballen
I always get the late binding error with the following method. Is there anyway around this without turning Option Strict Off?
Private Sub grdAccounts_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles grdAccounts.ItemDataBound If (e.Item.ItemType = ListItemType.Item Or e.Item.ItemType = ListItemType.AlternatingItem) Then Dim myBool As Boolean myBool = DirectCast(e.Item.DataItem("inactive"), Boolean) If myBool = True Then For x As Integer = 1 To e.Item.Cells.Count - 1 e.Item.Cells(x).BackColor = System.Drawing.Color.FromName("#ececec") Next End If End If End Sub -------------------------------- From: Chris Davey ----------------------- Posted by a user from .NET 247 (http://www.dotnet247.com/) <Id>jOwUfUmTwE+j80N6FGjw5w==</Id>
.
- References:
- Option Strict On disallows late binding
- From: Chris Davey via . NET 247
- Option Strict On disallows late binding
- Prev by Date: Option Strict On disallows late binding
- Next by Date: Re: Datagrid larger numbered pages not working
- Previous by thread: Option Strict On disallows late binding
- Index(es):
Relevant Pages
|