Home Forums WinForms controls Xceed Grid for WinForms Detail grid data loading time? Reply To: Detail grid data loading time?

User (Old forums)
Member
Post count: 23064

There are a couple potential problems in the way you bind your grids.  First, when binding the SubDetail, you use a relation name that seems to refer to a relationship between table 2 and table 3, not between table1 and table 3, as you mentioned in your first post, but you add this DetailGrid to the master Grid, not to the first DetailGrid.

i.e.:

                SubDetail.DataMember = “DetailBin_SubDetailBin”
                LocalGrid.DetailGridTemplates.Add(SubDetail)

Can you provide more details on this?

Second, the “standard” way to do the binding would be as the following (assuming a relationship between table1 and table3) :

            LocalGrid.DataSource = LocalData.ReturnDataset.Tables(0)
            LocalGrid.DataMember = “”

            detail.DataSource = LocalData.ReturnDataset.Tables(0)
            detail.DataMember = “MasterBin_DetailBin”

            SubDetail.DataSource = LocalData.ReturnDataset.Tables(0)
            SubDetail.DataMember = “Master_SubDetailBin”

or

            LocalGrid.DataSource = LocalData.ReturnDataset
            LocalGrid.DataMember = “Table0Name”

            detail.DataSource = LocalData.ReturnDataset
            detail.DataMember = “Table0Name.MasterBin_DetailBin”

            SubDetail.DataSource = LocalData.ReturnDataset
            SubDetail.DataMember = “Table0Name.Master_SubDetailBin”

 

Now if the relationship in the DB is really between table2 and table3, it should be like the following :

            LocalGrid.DataSource = LocalData.ReturnDataset.Tables(0)
            LocalGrid.DataMember = “”

            detail.DataSource = LocalData.ReturnDataset.Tables(0)
            detail.DataMember = “MasterBin_DetailBin”

            SubDetail.DataSource = LocalData.ReturnDataset.Tables(0)
            SubDetail.DataMember = “MasterBin_DetailBin.DetailBin_SubDetailBin”

And then add the DetailGrid to the other DetailGrid :

            detail.DetailGridTemplates.Add(SubDetail)

 

Imported from legacy forums. Posted by André (had 655 views)