Hello:
I am using a imagelist with an ultratree. I am setting the leftimage to one of the imagelist items.
I want to compare if the leftimage of a node like this:
utvProjectView.ActiveNode.LeftImages[0] != ilProject.Images[13]
But, it does not seem to be working. How can I accomplish this?
So:
1) Your example is using v.10.1 where I am using 9.2.20092.2042. If the control version is not an issue, how is it that your example code is returning the image file name, whereas mine returns the type? I took your line of code, duplicated it in my program and got the type, as shown with the screenshot I attached.
2) Understanding that '.ToString()' is inherently coming from .NET and that it would return the type...if it the ToString on your system is returning the name of the file, does that mean you have the method overridden?
I am using the TAG of Left and Right images to replace my functionality but it would be a lot cleaner if I could just compare the image to something.
Are you getting that in the sample attached here? Or only in your own code?
I tried this out in the sample project attached here and it worked for me. I was actually quite surprised by this, since typically, the ToString of a Bitmap simply returns the type name.
Either way, this has nothing to do with Infragistics code, this is all DotNet Framework code.
If, for whatever reason, you are not able to get the filename from the image, then there's really nothing else you can do about this. There's no support in DotNet for comparing two bitmaps or images.
I am getting System.Drawing.Bitmap, not the imagelist keyname. What am I missing here? I am currently using 9.2, is this a feature you implemented on version 10?
Hello Michael,
ultraTree1.ActiveNode.LeftImages[0].ToString() will also give you the file name. I have created a sample and attached it. I have also attached the screen shot of the LeftImages[0] value I see while debugging.
Asma Developer Support EngineerInfragisticswww.infragistics.com/support