You can convert the datatable of string that you use as input to an array of strings, that should sort out the behavior.
It has nothing to do with the centering.
When this line:
txt = this.Items[e.Index].ToString();
gets a DataRowView as input, then the ToString method will of course state that it is a DataRowView which is the result of it's ToString() implementation.
You can of course also override the ToString method.
You can also insert a check in the
Centered_ComboBox
class to check the type of the input and act accordingly - handle different types in the
CenteredComboBox_DrawItem
method.
Cheers,
Edo