The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team August 27, 2004 01:08 PM
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();