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
105
hide or disable an embedded editor
posted

So we have this UltraGrid in which four of the columns are embedded editors, namely an UltraCheckEditor configured to act as a radio button.  In each row, the user selects one of the four radio buttons, which are bound to four boolean properties of an object.  I am not at liberty to change this design unless there's no other possible option.

This works fine as long as all four options are available.  But we now have to add some rows in which only two of the four radios are allowed options, and we can't get this to work.  There seems to be no way to either make a radio in one cell disabled, or make it not visible, or cause the cell to not display any editor control.  Can someone point me to some technique that allows any one of these three options?  So far, no matter what I do, there is always either a checkbox or a radio button displayed, it's always visible, and it's always enabled.  I even tried changing the business object to return null instead of true or false on the unwanted columns, and still got a checkbox (which showed as checked!).

The nearest I've gotten to a blank column so far was to change the cell's Style to ColumnStyle.FormattedText.  On one trial, this produced blank columns, but on the next run, it displayed the word "False".  Is there a way to force one of these to display blank text?

The nearest I've gotten to a disabled column was to set the Style to ColumnStyle.Color, which produced a little white rectangle that didn't do anything when clicked.

Why can't I just tell it to use a regular radio button in a disabled state??