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
160
Grid displays relation keys
posted

I have the following shape statement:

SHAPE {SELECT tblProduct.ProductID, tblProduct.ProductRef, tblProduct.ProductName, tblProductCat.ProductCatID,
tblProductCat.ProductCatName FROM tblProduct INNER JOIN tblProductCat ON
tblProduct.ProductCatID = tblProductCat.ProductCatID WHERE tblProductCat.ProductCatName = 'Food Box'} AS BOMTop
APPEND ((SHAPE {SELECT * FROM tblBOMDet} AS BOMDet
APPEND ({SELECT tblBOMDetDet.BOMDetID, tblProduct.ProductRef, tblProduct.ProductName, tblProductCat.ProductCatName,
tblBOMDetDet.Priority, tblBOMDetDet.Comment, tblProduct_1.ProductRef AS [Make From Product],
tblProduct_1.ProductName AS [Make From Desc], tblProductCat_1.ProductCatName AS [Make From ProductCat]

FROM (((tblBOMDetDet INNER JOIN tblProduct ON tblBOMDetDet.ProductID = tblProduct.ProductID)
INNER JOIN tblProductCat ON tblBOMDetDet.ProductCatID = tblProductCat.ProductCatID)
LEFT JOIN tblProduct AS tblProduct_1 ON tblBOMDetDet.MakeFromProductID = tblProduct_1.ProductID)
LEFT JOIN tblProductCat AS tblProductCat_1 ON tblBOMDetDet.MakeFromProductCatID = tblProductCat_1.ProductCatID} AS BOMDetDet

RELATE 'BOMDetID' TO 'BOMDetID') as OrderDetGrant) as BOMDet
RELATE 'ProductID' TO 'ParentProductID') as BOMDet

 

Problem is that the old SSUltragrid we used to use not display any of the as headings.  The new grid is displaying OrderDetGrant, BOMDet and some others that were not there.  To hide these I could append to the end of each "ID" that forces out grids to hide these columns but that would require a huge amount of work to hide all of the columns.  Is there a grid setting that will suppress this behavior or is something else wrong?

 

Thank you for the help.

 

Johauna.

 

Parents
  • 160
    posted

    I still have a greater problem...  I can easily hide the IDs I don't want to show but now I have noticed that the child rows are empty in the grid.  Using the above connection string I use the following connection string:

     

    Provider=MSDataShape.1;Data Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=MyDB;Data Source=PGM8\SQLExpress

     

    I then use system.Data.DataSet then Systems.Windows.Forms.BindingSource then link the BindingSource to the Grid.   

     

    I use on the form four buttons that allow me to change to contents of the gris between the four loaded queries, examples are Donors, and Donors and their donations. Donors and their donations has a SHAPE but just Donors does not.

     

    The grid form loads with Donors loaded as default.  I can then click on Donors with Donations the first time and the child rows are fine. I  then click on Donors then go back to Donors and their donations and now the Parent Donor rows are there but the Donations child rows are empty, no data.  There are the same number of rows as I would expect but the data filling the rows is missing.

     

    Any ideas?

    Thanks for the help.

     

    Johauna. 

Reply Children
No Data