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.

change child dropdowns value based on change in parent dropdown

Thread ID:

Created:

Updated:

Platform:

Replies:

49285 Sep 14,2006 06:00 PM Sep 28,2006 04:20 AM Windows Forms 6
loading
Tags: Grouping
Michael Gutkin
Asked On September 14, 2006 06:00 PM

I need to change current displayed value in child dropdown lists in response to value change in parent record dropdonw list. How do you navigate record hierarchy do implement it?

Administrator [Syncfusion]
Replied On September 15, 2006 09:16 AM

Hi Michael,

You can use the RelationKind.ForeignKeyReference to handle this issue. Please refer the ForeignKeyReference browser sample for more details

//(the sample shipped with the Syncfusion Products ).
\Syncfusion\Essential Studio\4.3.0.25\windows\Grid.Grouping.Windows\Samples\ForeignKeyReference\

Let me know if this helps.
Best Regards,
Haneef

Michael Gutkin
Replied On September 15, 2006 12:22 PM

Hi Haneef,
Here is my problem; I have a three different data tables. They constitute three levels of hierarchy. I use ForeignKeyReference to "link" them together. All three tables have a column "Action".
When user selects a new value from top level (level 0) Action dropdown list, I need to change displayed (selected) value(s) in level 1 and level 2 action dropdown list boxes.
How would I do it???

>Hi Michael,

You can use the RelationKind.ForeignKeyReference to handle this issue. Please refer the ForeignKeyReference browser sample for more details

//(the sample shipped with the Syncfusion Products ).
\Syncfusion\Essential Studio\4.3.0.25\windows\Grid.Grouping.Windows\Samples\ForeignKeyReference\

Let me know if this helps.
Best Regards,
Haneef

Michael Gutkin
Replied On September 20, 2006 07:16 PM

Hi Haneef,
Did you have a chance to look at my problem? Do you need more info? Should I try to send you a sample?

Administrator [Syncfusion]
Replied On September 21, 2006 08:51 AM

Hi Michael,

My apologies for the delayed response.

Do you want to change the DataSource of the dropdown cell depending upon the value selected in another dropdown cell in a Grid? If so, Please refer to the below form thread for more details.

http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=102

It is for GridDataBoundGrid, but you can implement the same for the GridGroupingControl.

If this did not help, please update us with a sample project showing the issue.

For ForeignKeyReference Filtering, See the below forum thread.
http://www.syncfusion.com/support/forums/message.aspx?MessageID=40941

Thanks for your patience.

Regards,
Haneef

Michael Gutkin
Replied On September 25, 2006 03:15 PM

Hi Haneef,
Attached is a sample project containing three different views (See radio button). Two of these views have three level hierarchy. I need to implement following feature; when I change Action value in the drop-down list of the top level, it should change displayed (current) value in both children levels (level 2 and 3). If change current Action value in the drop-down list box on the second level, it should update drop-down list with new Action value in the third level.

RuleAlerts.zip

Administrator [Syncfusion]
Replied On September 28, 2006 04:20 AM

Hi Michael,

You can handle the TableControlCurrentCellCloseDropDown event and update the all nested table records in a grid. Below is a code snippet

private void iterate(NestedTable n)
{
if (n == null || n.ChildTable == null)
return;
foreach (Record rec in n.ChildTable.Records)
{
rec.SetValue("Reason", obj);
foreach (NestedTable nt in rec.NestedTables)
{
iterate(nt);
}
}
}

object obj = null;

void gridRuleAlerts_TableControlCurrentCellCloseDropDown(object sender, GridTableControlPopupClosedEventArgs e)
{
if (e.Inner.PopupCloseType == Syncfusion.Windows.Forms.PopupCloseType.Done)
{
GridCurrentCell currentcell = e.TableControl.CurrentCell;
currentcell.EndEdit();
GridTableCellStyleInfo style = currentcell.Renderer.CurrentStyle as GridTableCellStyleInfo;
GridRecordRow grec = style.TableCellIdentity.DisplayElement as GridRecordRow;

obj = grec.ParentRecord.GetValue("Reason");

if (grec.ParentRecord.NestedTables != null && grec.ParentRecord.NestedTables.Count > 0)
iterate(grec.ParentRecord.NestedTables[0]);
}

}

Here is a modified sample.
http://www.syncfusion.com/Support/user/uploads/RuleAlerts_f8ce88cd.zip

Thanks,
Haneef

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.

;