Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
765
Set Activ Row
posted

Hello,

i have under vb.net a litle problem

i have a grid

Row Nr   LadestelleNr  Ladeort

------------------------------------------

1              7                    Wien

2              5                    Ceske Budejovice

3              3                    London

4              9                    Berlin

Now I would have to mark the line with LadestelleNr 5. How can I get this under vb if I don't know the line number (in this case 2)

Thank you 

Best reguards

Frank

Parents
  • 1560
    Verified Answer
    Offline posted

    Hello,

    I have been looking into your question and my suggestion is using the InitializeRow event that is raised once per row that has been created in the WinGrid. Each time it is raised, you will have an opportunity to access the current row that is being passed through the event arguments and after checking the "LadestelleNr" column value to mark the row per your requirement. I created a small sample application in order to demonstrate how such behavior could be achieved. For the purposes of the example, I marked the required row like setting its BackColor to Yellow.

    Private Sub ultraGrid1_InitializeRow(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeRowEventArgs) Handles UltraGrid1.InitializeRow
            If Int32.Parse(e.Row.Cells("LadestelleNr").Value.ToString()) = 5 Then
                e.Row.Appearance.BackColor = Color.Yellow
            End If
        End Sub

     More information about the InitializeRow event could be found here.

    Please test the attached below sample on your side and let me know if I may be of any further assistance.

    Sincerely,

    Teodosia Hristodorova

    Associate Software Developer

    4861.UltraGrid_Mark_Row_VB.zip

Reply Children