BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
'hook the handler say in FormLoad AddHandler Me.GridDataBoundGrid1.Model.QueryCellInfo, AddressOf GridQueryCellInfo 'also set the grid to refresh the whole row as the current cell changes Me.GridDataBoundGrid1.Model.Options.RefreshCurrentCellBehavior = GridRefreshCurrentCellBehavior.RefreshRow Me.GridDataBoundGrid1.Model.Options.RefreshCurrentCellBehavior = GridRefreshCurrentCellBehavior.RefreshRow 'the handler Private Sub GridQueryCellInfo(ByVal sender As Object, ByVal e As GridQueryCellInfoEventArgs) If e.ColIndex > 0 And e.RowIndex > 0 Then Dim colorRow As Boolean = False If e.ColIndex = 2 Then colorRow = (e.Style.Text = "red") Else colorRow = (Me.GridDataBoundGrid1(e.RowIndex, 2).Text = "red") End If If colorRow Then e.Style.BackColor = Color.Red End If End If End Sub
> 'hook the handler say in FormLoad > AddHandler Me.GridDataBoundGrid1.Model.QueryCellInfo, AddressOf GridQueryCellInfo > > 'also set the grid to refresh the whole row as the current cell changes Me.GridDataBoundGrid1.Model.Options.RefreshCurrentCellBehavior = GridRefreshCurrentCellBehavior.RefreshRow > Me.GridDataBoundGrid1.Model.Options.RefreshCurrentCellBehavior = GridRefreshCurrentCellBehavior.RefreshRow > > 'the handler > Private Sub GridQueryCellInfo(ByVal sender As Object, ByVal e As GridQueryCellInfoEventArgs) > If e.ColIndex > 0 And e.RowIndex > 0 Then > Dim colorRow As Boolean = False > If e.ColIndex = 2 Then > colorRow = (e.Style.Text = "red") > Else > colorRow = (Me.GridDataBoundGrid1(e.RowIndex, 2).Text = "red") > End If > If colorRow Then > e.Style.BackColor = Color.Red > End If > End If > End Sub >