I have created a form that has a GridControl
in it that is bound to a BindingSource
upon instantiation. I intend to have the user be able to have multiple instances of this form open at the same time, while being able to have different filters applied on the separate views. This all currently works great. One thing I'd like to be able to do is disassociate the row selection between the forms. When I click a row in one GridControl
, the same row is selected in all other instantiations of the form.
Is there a way to do this? I don't want to create a copy of the BindingSource
because having to manage updates to any of the sources across all of them is going to be a real mess considering the complexity and size of the data to begin with. Can I have multiple GridControl
s bind to the same BindingSource
and be able to select rows independently between them?
Update:
I call this method in my Form
s constructor:
public virtual void UpdateDataSource()
{
if (_dataFeatures != CurrentInspectionFile.BoundFeatureList)
{
gridControl1.BeginUpdate();
_dataFeatures = CurrentInspectionFile.BoundFeatureList;
DetachEventHandlers();
AttachEventHandlers();
gridControl1.EndUpdate();
}
SetFeatureDataBindings();
gridControl1.DataSource = _dataFeatures;
UpdateLookupLists();
UpdateGridColumns();
}
_dataFeatures
is set to a BindingSource
object that is constructor in the getter for the BoundFeatureList
property. Each Feature
is a very complex object in and of itself.
Thanks