Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
2430
I have a field that I want to be sometimes an default field and sometimes a DropDownList
posted

Using Ultimate 15.1

I have afield that needs to be a regular edit control (Default - free entry text) or a dropdown list based on other data.

So I want to toggle on the fly based on After Cell Update.  I am using a Row Edit Template (so it is in a form with the Arrow showing).  As I toggle between display styles, the Combo Box arrow remains.  I want to hide the arrow if it is suppose to be Default.

Not sure how to do this.  I tried setting the ValueList to null but it threw exception.  The behavior is correct except for the arrow in terms of enabling the edit portion but I want to regenerate the control so the combo box arrow (dropdown arrow - combobox arrow) disappears.

Parents
No Data
Reply
  • 69832
    Offline posted

    The 'Default' constant does not necessarily mean the column will use a text editor; other criteria is used to determine which editor is most appropriate, such as the data type or, as is the case here, whether the ValueList property is explicitly set. In that case, the EditorWithCombo will be used.

    I know it isn't the most discoverable name ever given to a constant, but the name of the ColumnStyle constant you're looking for is named 'Edit'.

    That said, I don't think you will get away with doing this in AfterCellUpdate...you might want to use AfterRowDeactivate instead.

Children