[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

Adding image to cell in DevExpress XtraGrid

Asked by JimR123b in C# Programming Language, Visual Studio

Tags: DevExpress, XtraGrid

Hi,

I have an XtraGrid component which fills its cells with content by having its DataSource property assigned.

All of the cells currently have just text in them, and I would like to add images into the cells, alongside the existing text, without adding extra columns or overriding the custom draw routines.

It would seem that it's possible, as if you go into the grid Designer, then Feature Browser, it shows what I'm trying to achieve, with little pictures of cherries next to "Procuce", and cheeses next to "Dairy Products", all in the same column.

How can I achive this?

I'd rather avoid doing custom drawing of cells, because that would mean having to do custom drawing for all cells, to make sure the style all matches up. I'm hoping that it will be a case of tapping into the right event, and setting a "Cell.ImageIndex" property or something...
[+][-]11/06/09 04:57 AM, ID: 25758672Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/06/09 05:35 AM, ID: 25758894Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091111-EE-VQP-92 - Hierarchy / EE_QW_3_20080625