Home Forums WinForms controls Xceed Grid for WinForms Grid ComboBoxEditor … text align, images and a few other questions Reply To: Grid ComboBoxEditor … text align, images and a few other questions

User (Old forums)
Post count: 23064

Problem 1 :

Columns with a numeric DataType are always right aligned.  You should be able to change this by setting the HorizontalAlignment property on the Column.

Problem 2 :

ImagePosition and ImageAlignment should work, we’d have to see what you do exactly to understand why it does not work.  However, the image can only be at the left or right of the DisplayFormat, so it is not possible to put it right in the center.  The only solution for that would be to create your own custom viewer and editor, so the image is always in centered.

Problem 3 :

The cell value is automatically updated, no need to do anything special.  The only reason I can see why it does not update is that there is an exception being throw but that is swallowed by the grid or the .NET framework.  Is your debugger set to break on all exceptions?.  Go to Debug Menu -> Exceptions -> Common Language Runtime Exceptions, and select “Thrown” CheckBox.  Also make sure the “Enable Just My Code” CheckBox is unselected (Tools Menu -> Options -> Debugging -> General) if you’re using VS 2005 or up.  This will make sure that no exceptions are swallowed by the grid or the framework, and that the debugger will break in any part of the code, not just yours.

Problem 4 :


Problem 5 :

DisplayFormat is for text formating, not image.  The image is set through the ImageMember.


If you look at our Extensibility sample, it actually uses a ComboBox with an image and a text, so it should give you want you need to accomplish what you want.

Under Vista, by default it installs here :

C:\Xceed Component Samples\Xceed Grid for .NET 3.8\Samples\CSharp\Extensibility

Under XP, it installs here :

C:\Program Files\Xceed Components\Xceed Grid for .NET 3.8\Samples\CSharp\Extensibility


Imported from legacy forums. Posted by André (had 1341 views)