Hello there, i have several questions about the "right" way to do some things with xtragrid.
Basically, im managing all my data logics in a separate class on my application, and that class is running on a separate thread, because this application going to connect to a remote server (internet), and by running the db queries, updates, etc, the UI wont "freeze".
The problem is, in one of my views im using 2 lookupedit controls for 2 columns, those lookup edit controls take their values from 2 different tables on my dataset, AND im filling the dataset tables manually at runtime.
For some reason, everything works perfect, the grid loads the data, etc, BUT the lookupedit controls refuse to display ANY data at all.
I would like to mention that if i bind an standard datagridview control to the SAME datatable that im using for the lookupedit controls, the data is there and i can see/edit it.
I will paste some parts of my code for better understanding.
The following method is inside a separate class and initializes several dataTable objects with data from a mysql DB, please note that this method is called in a separate thread using a BackgroundWorker component.
Public Sub inicializar()
Dim daVideos As New MySqlDataAdapter("SELECT * FROM videos", mySQLConnection)
Dim daTipos As New MySqlDataAdapter("SELECT * FROM tipos", mySQLConnection)
Dim daFormatos As New MySqlDataAdapter("SELECT * FROM formatos", mySQLConnection)
Dim daTomas As New MySqlDataAdapter("SELECT * FROM tomas", mySQLConnection)
RaiseEvent action("Procesando Videos")
videosTable.TableName = "videos"
daVideos.Fill(Me.videosTable)
RaiseEvent action("Procesando Tipos")
tiposTable.TableName = "tipos"
daTipos.Fill(tiposTable)
RaiseEvent action("Procesando Formatos")
formatosTable.TableName = "formatos"
daFormatos.Fill(formatosTable)
RaiseEvent action("Procesando Tomas")
tomasTable.TableName = "tomas"
daTomas.Fill(tomasTable)
RaiseEvent initComplete()
RaiseEvent action("Inicialización Completa")
End Sub
After this method finishes, i have several dataTables filled with data that i merge to my main dataset:
Private Sub BackgroundWorker1_RunWorkerCompleted(ByVal sender As System.Object, ByVal e As System.ComponentModel.RunWorkerCompletedEventArgs) Handles BackgroundWorker1.RunWorkerCompleted
datasetChilds.Merge(sqlengine.formatosTable)
DataSet1.Merge(sqlengine.tomasTable)
DataSet1.Merge(sqlengine.formatosTable)
DataSet1.Merge(sqlengine.tiposTable)
DataSet1.Merge(sqlengine.videosTable)
busyDialog.Close()
End Sub
The lookupedit controls in question are binded to datasetChilds.formatosTable and DataSet1.tiposTable ....
If i bind any other control (like a datagridview) to the same datasets, everything just works, but lookupedit controls from DevExpress are showing just the columns, but no data at all :/
Btw, the reason im using dataTables as "intermediates" to transfer the data back to the main dataset is because you cant fill a dataset from a different thread than the one it was created.
Any suggerences will be welcome.
Im using the trial version of DXperience 7.1.4 on VisualBasic Express 2005.
Thanks in advance, Diego.
Take Care, Diego Massanti.