Note that there are some explanatory texts on larger screens.

plurals
  1. PODisassociate row selection between two devexpress gridcontrols that are bound to the same bindingsource
    text
    copied!<p>I have created a form that has a <code>GridControl</code> in it that is bound to a <code>BindingSource</code> 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 <code>GridControl</code>, the same row is selected in all other instantiations of the form.</p> <p>Is there a way to do this? I don't want to create a copy of the <code>BindingSource</code> 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 <code>GridControl</code>s bind to the same <code>BindingSource</code> and be able to select rows independently between them?</p> <h2>Update:</h2> <p>I call this method in my <code>Form</code>s constructor:</p> <pre><code>public virtual void UpdateDataSource() { if (_dataFeatures != CurrentInspectionFile.BoundFeatureList) { gridControl1.BeginUpdate(); _dataFeatures = CurrentInspectionFile.BoundFeatureList; DetachEventHandlers(); AttachEventHandlers(); gridControl1.EndUpdate(); } SetFeatureDataBindings(); gridControl1.DataSource = _dataFeatures; UpdateLookupLists(); UpdateGridColumns(); } </code></pre> <p><code>_dataFeatures</code> is set to a <code>BindingSource</code> object that is constructor in the getter for the <code>BoundFeatureList</code> property. Each <code>Feature</code> is a very complex object in and of itself.</p> <p>Thanks</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload