Hi,
I use an UltraDataSource and i modify his content programmatically and i can see the changes in the UltraGrid but how can i change the appearance depending on the change of the source?
Thank you,
Kind Regards.
Just stick a variable in the initialize layout method that lets you run two layouts:
Private Sub mygrid_InitializeLayout(ByVal sender As Object, ByVal e As Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs) Handles mygrid.InitializeLayout
if datasource1= true then
'run this initialize layout
else
End Sub
Thank you for the response but i don't think it's the good answer (my english is quiet poor, i tried my best to explain my problem lol...)
The problem is that the grid is associated with an UltraDatasource but i don't use "Databind" fonction
i only manipulate the DataSource :
I create the schema like this :
With Me.DataSource.Band.Columns ' Add columns to the root band. .Add("col1", GetType(String)) .Add("col2", GetType(String))
End With
'create a row from code
Me.DataSource.Rows.SetCount(Me.DataSource.Rows.Count + 1) Dim row As UltraDataRow 'Get the new row. row = Me.DataSource.Rows(Me.DataSource.Rows.Count - 1) row("col1") = "data" row("col2") = "data"
this code works, the ultradatasource generate the row and data are modified, we can see any modifications in the ultragrid BUT my question is how can i detect that data from a specific row or cell has change so i can change the appearance of the grid ?