We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

GridGrouping Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

95081 Jun 19,2010 12:57 PM Jun 23,2010 04:48 AM Windows Forms 2
loading
Tags: Grouping
Jan Leimbach
Asked On June 19, 2010 12:57 PM

Hi folks,

I'm using Essential Studio Enterprise 2010 vol 2.
I adapted the sample code from one of the grouping demos to work in my project. I got one parentTable and one childTable and tried to join. Unfortunately with no success.
In single step debugging I checked that both datasource containing data and also RelationKeys do matching.
All I get is the correct row from the parent table, a "+" in front of the row, but no childdata.

Can you help me? Thanks a lot and sorry for my bad english.
Jan

patienttreatment and patientdialyzer are classes with public string fields containing my data:

public class patientdialyzer
{
private string _fkPatientTreatment;

public string fkPatientTreatment
{
get { return _fkPatientTreatment; }
set { _fkPatientTreatment = value; }
}
...

public class patienttreatment
{
private string _idPatientTreatment;

public string idPatientTreatment
{
get { return _idPatientTreatment; }
set { _idPatientTreatment = value; }
}
...

private void LoadTreatment(string id)
{
patienttreatment[] parentTable = db.GetPatientTreatment("fkPatientMasterdata = " + id);
patientdialyzer[] childTable = db.GetPatientDialyzer("fkPatientMasterdata = " + id);
// I checked that parentTable and childTable are containing valid data.
this.gridGroupingControl1.Engine.SourceListSet.Add("Treatments", parentTable);
this.gridGroupingControl1.Engine.SourceListSet.Add("Dialyzer", childTable);

GridRelationDescriptor parentToChildRelationDescriptor = new GridRelationDescriptor();
parentToChildRelationDescriptor.ChildTableName = "Dialyzer"; // should be same as SourceListSetEntry.Name.
parentToChildRelationDescriptor.RelationKind = RelationKind.RelatedMasterDetails;
parentToChildRelationDescriptor.RelationKeys.Add("idPatientTreatment", "fkPatientTreatment");
gridGroupingControl1.TableDescriptor.Relations.Add(parentToChildRelationDescriptor);

this.gridGroupingControl1.DataSource = parentTable;

this.gridGroupingControl1.TableOptions.GridVisualStyles = Syncfusion.Windows.Forms.GridVisualStyles.Office2007Blue;
this.gridGroupingControl1.TableOptions.GridLineBorder = new Syncfusion.Windows.Forms.Grid.GridBorder(GridBorderStyle.Solid, Color.FromArgb(208, 215, 229), GridBorderWeight.Thin);
this.gridGroupingControl1.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails = false;
this.gridGroupingControl1.TopLevelGroupOptions.ShowCaption = false;
this.gridGroupingControl1.Appearance.AnyCell.Font.Facename = "Verdana";
this.gridGroupingControl1.Appearance.AnyCell.TextColor = Color.MidnightBlue;
this.BackColor = Color.FromArgb(223, 227, 239);

}

Jan Leimbach
Replied On June 19, 2010 01:03 PM

Screenshot of parenttable and childtable in debug view.



Desktop_f79484ec.zip

Jisha Joy [Syncfusion]
Replied On June 23, 2010 04:48 AM

Hi Jan,

Your incident 69169 for the same query is updated. Please follow up with it.

Regards,
Jisha

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;