Question

I have a web form with a button and a DetailsView control on it. In the button's click event I change the DetailsView control to insert mode so I can add records:

DetailsView1.ChangeMode(DetailsViewMode.Insert)

Everything works fine, except for a checkbox in the DetailsView. When the DetailsView goes into insert mode, the text describing what the checkbox is for disappears. The checkbox itself works fine.

Why is my text disappearing and how can I fix it?

Was it helpful?

Solution

I was able to fix my problem by changing it to a template field. Not sure why it wouldn't work the other way.

OTHER TIPS

Is the text in a Label that is in the item template? If so, you'd need to add it to the Edit Item Template. Also check that the width of the control is wide enough for all the controls and text. It may be getting hidden due to absolute positioning.

Thanks for the quick reply. The text isn't in a template. It's just a CheckBoxField with the Text property set to "Active":

I've tried widening the field and the DetailsView control, but the text still disappears when I click the button.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top