Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

Binding Command to Button within DataTemplate

$
0
0

Hi,

I am using WPF Toolkit in my project. And I have DataGrid in my XAML.
Now I have added one button in one column using DataTemplate.

I have binded DataView to this Grid. But the only problem am facing is am not able to bind Command to the Button within datatemplate.

I have written following XAML to bind command to this button

<Button Content="..." Command = "{Binding Path=ShowDealListCommand}"/>

 

But when I clicked this button it's not calling target method I have written in this command.

I am able to bind content property to this button so this means that there is no issues of setting datacontext. As I have already set DataContext for this XAML in Codebehind.

 

Pls help me !!

 

Thanks ! :)

 


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>