Hi everybody,
I set a datasource on a form and added few string columns. I added a wingrid and linked it with datasource. Works fine. At runtime, I set my entities list object (loaded with Entity Framework) and the strings are displayed within the grid.
I wanted to add a new visual indicator so I added an image property getImage to my partial Entoty class.
I return differents ressources (png files) given the data contained in the entity.
problem is that even if I return sometimes image A, then B, then C, ALL rows will have the last image returned displayed (in each row).
I don't understand how I could avoid this behavior as for me each row are independant and linked to different entities objects in the datasource.
Can you lpease advise me, is it possible to display easily differents images (on different rows) for a same column ?
Regards
Hello ,
I suppose that your issue is caused by your Entity class and your getImage method return the latest loaded image for all rows. In the attached sample you could see that I am bind UltraGrid to BindingList of MyClass, which has image and name properties, and each grid’s row has a different image. If you want you could post a small sample in order to look into it and investigate this issue further for you.
Please let me know if you have any further questions.
Here is the code snippet for Entity Lead partial Class (I extend the code generated entity class to add the GetFlagImage property)
I set a break point and I can confirm that when setting datasource the code sometimes return Personne_16, sometimes NPAI_16 but the latest value is the one used in all the rows when the form is displayed on screen.
GetFlagImage is a datasource column set in Ultradatasource (type Bitmap).
Thanks for your feedback.
============
public partial class Lead
public Image GetFlagImage { get { if (this.Flag == 0) return UI_Icon.Personne_16; else return UI_Icon.NPAI_16; } } }
Hello,
Could you please post a small sample where your issue is reproducible in order to inveterate this further for you.
Thank you.
Unfortunately, I would have to cut most of the application code and I have privacy agreements with my customer that prevent me to do that.
Is it possible to schedule a support meeting via netviewer or any other remote desktop solution ?
I would be glad to share the problem and try to find a solution as it is a critical impact for me.
Hello,
Based on our LogMeIn season we find a way to achieve the desired behavior using InitializeRow event of your UltraGrid. Since the Entity issue is reproducible only on your machine, if you could isolated in a small sample I would be glad to take a further look at it, because currently I couldn’t tell for sure why hovering over the UltraGrid cause changing the value in the hovered over cell.
I will update this thread if we have any additional information.