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
490
Grid Bind
posted

Hi all,

I have Infragistic Grid and i connect this grid with Microsoft dataSource control like this :

this.bindingSource1.DataSource = typeof(Project1.BE.Market);//connect this dataSource with Class Market

this.Grid1.DataSource = this.bindingSource1;//connect dataSource controls with Grid1

onLoad:

  Market[ ] objWatch = GetMarketList( );

  bindingSource1.DataSource = objWatch ;//Now the grid will fill with data .

Now : 

Q1: I Recived 1 object of type Market (already Exist in grid )but with new value ,How can replace this record with new one very fast .also 

Q2: I need to change the cell Color depending on compare data in old-cell and New-Cell data.

  • 4555
    posted

    Hi,

    For the second question you can handle the Grid's CellChange event.,compare the cell's orignal value to it's value or text and chage the cellaapearance property. your code may look as follows:

       Private Sub grdItems_CellChange(ByVal sender As System.Object, ByVal e As Infragistics.Win.UltraWinGrid.CellEventArgs) Handles grdItems.CellChange
            If e.Cell.OriginalValue > e.Cell.Value Then
                e.Cell.Appearance.BackColor = Color.CadetBlue


            End If

        End Sub

     

    Magued