For anyone who might be interested. Here's the relevant code I had to add to the user control to make it work correctly:
public string IndexText { get { return _indexText; } set { _indexText = value; OnIndexChanged(); } }#region "Event Handlers" private EventHandler IndexTextChangedEvent; public event EventHandler IndexTextChanged { add { IndexTextChangedEvent = (EventHandler)System.Delegate.Combine(IndexTextChangedEvent, value); } remove { IndexTextChangedEvent = (EventHandler)System.Delegate.Remove(IndexTextChangedEvent, value); } } protected void OnIndexChanged() { if (IndexTextChangedEvent != null) IndexTextChangedEvent(this, EventArgs.Empty); }
#endregion
There is already a sample of how to do this in the StrataFlix sample. If you open up the UI assmebly and then look at the WinForms\CLookupControls\PeopleLookupControl it will show you how to implement the IBusinessBindable to a custom property. This should get you going in the right direction.
Please see attached project. Hopefully it will give you a better idea about what I am dealing with
Thank you for your help.
I developed a user control that implements IBusinessBindable interface. The control has one textbox and bunch of buttons. Textbox text is a bindable property, and it's exposed through a custom property IndexText. The control DataSourceUpdateMode is set to DataSourceUpdateMode.OnPropertyChanged (see control code snippet below)
Everything works, but when user clicks on the textbox without changing anything, the BO states becomes Dirty. How can I get arround that?
string
{
}
_indexText =
syntaxEditorIndexText.Text = _indexText;
#region
[
_BindingUpdateMode =
_BindingField =
_BindingFormat =
_BindingProperty =
_BusinessObject = (
_IgnoreManageUIReadOnlyState =