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
675
DataSource Binding is to long
posted

Hi,

 I have a problem with DataSource Binding a dataSet to the grid

For certain project it takes between 2 or 3 minutes to bind de data to the grid

I Prepare by programmation the data into 2 dataTable that are in a DataSet. this operation is very fast

Once my dataset is ready I bind It into the grid.Everything works fine but for certain project the binding it is to long.

Is there someting I can do to optimise this?

This is some code to explain how I structure my DataTable and Dataset

Private Sub CreateGridStructure()

CreateRootTable() ' Create Column for the rootTable

CreateSubCategoryTable() ' Create Column for the subCategory Table

m_DataSetRoot.Tables.Add(m_tblroot) ' Addind the rootTable into the DataSet

m_DataSetRoot.Tables.Add(m_tblSubCategory) ' Adding the subCategoryTable into the DataSet

Dim rel As DataRelation

' Create the relation between the 2 Datatablerel = New DataRelation(RELATION_NAME_SUB_CATEGORY, m_DataSetRoot.Tables("Root").Columns(COL_NAME_PECLEUNIK_PHASE_CATEGORY), m_DataSetRoot.Tables("SubCategory").Columns(COL_NAME_PECLEUNIK_PHASE_CATEGORY), False)

m_DataSetRoot.Relations.Add(rel)

m_DataSetRoot.AcceptChanges()

End Sub

 Thanks in advance