如何将多个参数传递给Telerik:Radbutton

发布于 2025-01-25 20:56:47 字数 1050 浏览 2 评论 0原文

我有2个Telerik:RadGridView对象(名为FTP和电子邮件网格),由Pagetabs隔开,用户可以通过单击一行来从中选择多个记录。我需要通过这2个Telerik:RadgridView 用户点击确定后的对象,因为我需要知道用户选择了哪些记录以及它们所属的网格(无论是emailGrid还是FTPGrid)。我已经阅读了如何从此链接中进行多个绑定:

传递两个命令使用WPF绑定的参数

,但我不确定如何将它们添加到我的代码中,因为语法似乎有所不同,因为我们正在使用Telerik。

我们的代码看起来像这样:

<telerik:RadButton Content="Select Client" 
HorizontalAlignment="Left" Margin="5" 
Command="{Binding SelectClientCommand}" 
VerticalAlignment="Top" Width="75" 
CommandParameter="{Binding SelectedItems, ElementName=gridEmail}" />  <----- This is where I want to pass my 2 grid objects 

上面链接的建议似乎具有不同的语法:

     <MultiBinding Converter="{StaticResource MyMultiConverter}">
         <Binding Path="..." ElementName="MyTextBox"/>
         <Binding Path="..." ElementName="MySomethingElse"/>
     </MultiBinding>

我似乎无法使其起作用。有什么建议如何做?

I have 2 telerik:RadGridView object (named FTP and Email grid) separated by pagetabs that a user can choose multiple records from by clicking a row. I need to pass those 2 telerik:RadGridView
objects after the user clicks on OK as I need to know which records were selected by the user and from which grid they belong(whether EmailGrid or FTPGrid). I've read how to do multiple bindings from this link:

Passing two command parameters using a WPF binding

but I'm not sure how to add them to my code as the syntax seems different because we are using telerik.

Our code looks like this:

<telerik:RadButton Content="Select Client" 
HorizontalAlignment="Left" Margin="5" 
Command="{Binding SelectClientCommand}" 
VerticalAlignment="Top" Width="75" 
CommandParameter="{Binding SelectedItems, ElementName=gridEmail}" />  <----- This is where I want to pass my 2 grid objects 

and the suggestion from the link above seems to have a different syntax:

     <MultiBinding Converter="{StaticResource MyMultiConverter}">
         <Binding Path="..." ElementName="MyTextBox"/>
         <Binding Path="..." ElementName="MySomethingElse"/>
     </MultiBinding>

I can't seem to make it work. Any suggestions how to do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文