Help with highlighting rows in Grid based on rows selected in another Grid

Posted by: Victor.m.charles.civ on 7 September 2019, 10:44 am EST

  • Posted 7 September 2019, 10:44 am EST

    Hello,

    How do I modify the code below to highlight rows in C!AOP5 based on fields selected in Grid1?

    Private Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
    C1AOP5.Refresh()
    yx = ""
    For Each Srow In Me.DBGrid1.SelectedRows
    If vc1 > 0 Then
    yx = yx & "," & "'" & Me.DBGrid1.Columns(0).CellText(Srow) & "'"
    Else
    yx = "'" & Me.DBGrid1.Columns(0).CellText(Srow) & "'"
    End If

    vc1 = vc1 + 1
    If yx.StartsWith(",") Then
    yx = yx.Substring(1, yx.Length - 1)
    End If
    Next
    apply = True
    C1AOP5.Refresh()
    C1AOP5.FetchRowStyles = True
    End if

    Thanks,
    Victor
  • Marked as Answer

    Replied 8 September 2019, 10:22 pm EST

    Hi Victor,
    In MVC FlexGrid, there is formatItem event which can be used to style the cells based on some condition check.

    Please refer to the following demo sample for reference:
    https://demos.componentone.com/ASPNET/LearnMvcClient/C1FlexGrid/CustomCells/1

    Hope it helps! Please elaborate your requirement in case if you have further queries.

    Regards,
    Manish Gupta
  • Replied 11 September 2019, 9:59 am EST

    Thank You.
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels