?
Solved

Pass more then 1 value to ConverterParameter\BindingItem

Posted on 2010-01-11
2
Medium Priority
?
1,012 Views
Last Modified: 2013-11-12
Hello,

I've created grid cell template like

                               <d:DataGridTemplateColumn Header="#">
                                    <d:DataGridTemplateColumn.CellTemplate>
                                        <DataTemplate>
                                            <HyperlinkButton NavigateUri="-->should pass more then one value here to build valid link<--" >
                                                <Image Source="{Binding ImageUrl}" Width="18" Height="18" />
                                            </HyperlinkButton>                                                
                                        </DataTemplate>
                                    </d:DataGridTemplateColumn.CellTemplate>
                                </d:DataGridTemplateColumn>

I've tried to use Converter, but have no idea how to pass more then one ConverterParameter in there as well

Hyperlink should be build as  "downloadfile.aspx?dictionaryid={0}&itemid={1}&id={2}", where parameter {2} is property of enumerated item, and {0}, {1} is common properties.

Is there a way to build link such this one preferably markup only, but code solutions also accepted.

Thanks in advance.
0
Comment
Question by:Silverlay
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 25

Accepted Solution

by:
apeter earned 2000 total points
ID: 26356996
Did you try passing the BindingItem itself an ArrayList Property which will have { 0 } to { 1 } and return the string at the end.

Else in the code behind, you can use Loading_row event , get the data context(e.Row.DataContext) and manipulate the URL.
0
 
LVL 5

Author Comment

by:Silverlay
ID: 26357723
First i created one more property like:
public readonly Property { get { return Property1 + Property2 + Property3; } } and that worked fine.

Then just created ValueConverter and took object it self as you mentioned, thats works as well.
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows a few slightly more advanced techniques for Windows 7 gadget programming, including how to save and restore user settings for your gadget and how to populate the "details" panel that is displayed in the Windows 7 gadget gallery.  …
This article shows how to make a Windows 7 gadget that accepts files dropped from the Windows Explorer.  It also illustrates how to give your gadget a non-rectangular shape and how to add some nifty visual effects to text displayed in a your gadget.…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question