0

I have created a control in dotvvm to show a textbox with a value if it's in view mode, otherwise show a combobox if mode is in add or edit.


<bs:ComboBox DataSource="{value: _control.DataList}" EmptyItemText="{value: _control.EmptyTextValue}" SelectedValue="{value: _control.SelectedValue}" Enabled="{value: !_control.IsViewMode }" Visible="{value: !_control.IsViewMode}" Style-border-color="{value: _control.IsProperyValid ? 'silver' : 'salmon'}"
             ItemValueBinding="{value: ID}" ItemTextBinding="{value: Name}" >
</bs:ComboBox>

Now, every viewmodel using this control has their own custom event to call if SelectionChanged invoke if the user selects an item in the combobox.

how can I achieve this?

edoms06
  • 89
  • 2
  • 11

0 Answers0