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.
Syncfusion Feedback

Databound Grid with master/slave Combos

Thread ID:

Created:

Updated:

Platform:

Replies:

18331 Aug 27,2004 05:03 PM UTC Aug 27,2004 06:08 PM UTC Windows Forms 1
loading
Tags: GridControl
Linda
Asked On August 27, 2004 05:03 PM UTC

I''m having a problem when I select a value in the Master Combo that filters the Slave Combo. If I have a blank value in the Slave -- it exceptions. It also exceptions if I set the .Text of my slave combo to an empty string (as suggested in http://www.syncfusion.com/Support/article.aspx?id=567) You can duplicate this problem by going to your Essential Grid Samples, Databound, GDBGcombos. On the first row, tab to the Employee combo and delete ''Buchanan'' from that combo. Then try to move off of the combo. The following exception occurs. How can I prevent this error from happening ?? catched at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.SaveCellInfo(GridSaveCellInfoEventArgs e) in :line 0 catched at Syncfusion.Windows.Forms.Grid.GridCurrentCell.ConfirmChanges(Boolean closeDropDown) in :line 0 catched at Syncfusion.Windows.Forms.Grid.GridCurrentCell.Deactivate(Boolean discardChanges) in :line 0 catched at Syncfusion.Windows.Forms.ScrollControl.RaiseCancelMouseEvent(MouseEventArgs e, CancelMouseDelegate d) in :line 0 catched at Syncfusion.Windows.Forms.Grid.GridModelDataBinder.SaveCellInfo(GridSaveCellInfoEventArgs e) in :line 0 catched at Syncfusion.Windows.Forms.Grid.GridCurrentCell.ConfirmChanges(Boolean closeDropDown) in :line 0

Administrator [Syncfusion]
Replied On August 27, 2004 06:08 PM UTC

I think you will have to come up with a valid vale to initialize the cell with. If you cannot get an inital value some other way, worse case would be to get it directly from the slave list, maybe taking the first value in the list. Here is a snippet that will do it in the KB sample. //this.gridDataBoundGrid1[cc.RowIndex, SlaveColumn].Text = ""; DataView dv = new DataView(slaveComboTable); dv.RowFilter = string.Format("[masterId] = ''{0}''", this.gridDataBoundGrid1[cc.RowIndex, MasterColumn].Text); this.gridDataBoundGrid1[cc.RowIndex, SlaveColumn].Text = dv[0]["id"].ToString();

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.

Warning Icon 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.Close Icon

;