How to get rid of checkbox text in ObjectListView subparagraphs

I created ObjectListViewone that has sub points with CheckBoxes. This is pretty simple, but the problem, for some reason, continues to show True / False next to the checkbox. I could hide it with a setting width of 23-30. This is similar to using the true / false value from the database, but instead of just using it for the checkbox, it also displays it.

ObjectListView

So is there any way to get rid of it?

+5
source share
3 answers

To fix this, you need to set OwnerDrawto Trueon ObjectListView. It took a while to understand.

+7
source

. , OwnerDrawn true . UseSubItemCheckBoxes = true OwnerDraw = true , , , .

+4

I know that this has already been answered, but as an alternative, you can do the following (especially if you do not want OwnerDraw = True):

column.AspectToStringConverter = delegate (object o)
{
  return string.Empty;
};

As a result, an empty string will be displayed.

+4
source

All Articles