This is a migrated thread and some comments may be shown as answers.

Can not add image to Winform radTreeView ImageList

10 Answers 248 Views
Treeview
This is a migrated thread and some comments may be shown as answers.
Thaneavin Khieu
Top achievements
Rank 1
Thaneavin Khieu asked on 24 Nov 2007, 05:10 AM
I am using the Winform radTreeView. I am trying to add small PNG file (16x16) into the ImageList during design time. When press the Add button and choose an image from the file browser I get this error dialog that says this:

Parameter must be of type.
Parameter name: value

Is there something I have missed? i have set the color depth to 32 bit since it is a PNG file.


Thanks,
-TK

10 Answers, 1 is accepted

Sort by
0
Jordan
Telerik team
answered on 27 Nov 2007, 02:23 PM
Hello Thaneavin Khieu,

I tried to reproduce the issue that you mention, but to no avail. Could you share the exact steps that you take before getting the error?

It would be best if you can send us  a sample project that demonstrates the problem, so that we can investigate it locally. You can do so in a new support ticket.


Sincerely yours,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
andreas
Top achievements
Rank 1
answered on 25 Jan 2008, 11:25 AM
hello!

i've got the same problem! i can't add any kind of image (jpg. png, gif, ...) to the imgelist because i get the same error as above...

thanks, ab
0
Jordan
Telerik team
answered on 28 Jan 2008, 12:19 PM
Hi Andreas,

In order to help you I will need you to elaborate a bit more on the following topics:
  1. The version of RadControls for WinForms that are you using (e.g. Q3 2007)
  2. The properties of the images that you are adding to the image list (Size, Type,  etc)
  3. Steps or piece of code that can help us reproduce the error.
Thank you for your cooperation.

Regards,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
carisch
Top achievements
Rank 1
answered on 06 Feb 2008, 05:54 PM
I'm getting the same errors also.  I've tried .jpg and .gif.  This is all at design time, not through code.  Can't send you any details other than the steps.  I'm on Q2 2007 I believe.


Brian.
0
Jordan
Telerik team
answered on 07 Feb 2008, 07:58 AM
Hello Brian,

Any information about this issue will help identify and address it sooner. Could you please send us the steps that you take in order to get the error in design time.

Are you experiencing this issue with just the Q2 2007 version or with other versions of RadControls for WinForms too?

We are looking forward to your response.

Sincerely yours,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
kiran
Top achievements
Rank 1
answered on 28 May 2008, 05:20 AM
i am using Q1 2008. While adding images to nodes i am getting the same error.

Steps:

1) i opened images collection window from     ImageList->Images(Collection)
2) clicked on Add
3)openFileDialog box opened
4) Selected a 16x16 color .jpg image
5) clicked on open button
6) then i got the error like 
            "Parameter must be of type image".
             Parameter name:value 

My requirement is : Instead of Node text i want to display a image.

is it possible with RAD controls?

thanks in advance for your help?


regards,
kiran 
0
Jordan
Telerik team
answered on 28 May 2008, 11:02 AM
Hi kiran,

Yes, you can have a node with just an image. To do that set the ImageIndex or Image property and set the Text property to empty string as shown below:

RadTreeNode newNode = new RadTreeNode(string.Empty, 1, -1); 
//can also be done like that: 
//newNode.ImageIndex = 1; 
//newNode.Text = string.Empty; 
this.radTreeView1.Nodes.Add(newNode); 

Regarding the strange error at design time, please tell us if you have more than one versions of RadControls for WinForms installed. What Telerik assemblies do you have in GAC? What Visual Studio add-ins do you have installed?

I hope this helps. If you have any further questions, contact me.

Regards,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
kiran
Top achievements
Rank 1
answered on 29 May 2008, 06:38 AM
Hi Jordan,

Thanks for your prompt reply.

The error was resolved now. Actually it is because of adding the images directly to the default image list. I have not added any winforms imagelist to the tree view.
 
A small query:

If we added far images to all the nodes , will it be possible to align all the images in a line(straight vertical line). and will it be possible to place a vertical line on all the tree view node far images(aligned)?

Thanks in advance,

Regards,
Kiran
0
Jordan
Telerik team
answered on 30 May 2008, 08:26 AM
Hello kiran,

If you are not using RadTreeView in RTL(Right To Left) mode, then nodes are left aligned. If the tree view is used in RTL mode, its nodes are right aligned. Also, you can have the RadTreeView show lines by setting the ShowLines property to true.

I am not sure I completely understand what you mean by "to place a vertical line on all the tree view node far images(aligned)". A simple diagram (or a picture made with MS Paint will do too) will make things much clearer.

I'm looking forward to your response.

All the best,
Jordan
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Stefan
Telerik team
answered on 18 Mar 2011, 08:24 AM
Hi guys,

Please note that in Q1 2011 we have introduced a major upgrade of RadTreeView control, which is now virtualized and fully customizable. Feel free to download the latest release and try it out.
For more information about this release, please refer to this blog post.
 
Regards,
Stefan
the Telerik team
Tags
Treeview
Asked by
Thaneavin Khieu
Top achievements
Rank 1
Answers by
Jordan
Telerik team
andreas
Top achievements
Rank 1
carisch
Top achievements
Rank 1
kiran
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or