ICommand binding to a button with CellItemTemplate

Hi
How to bind a command from the model view to a button with CellItemTemplate. I am using the following xaml code, but the command is not performed.








Best regards,

Bartosz Solarski
COMP Soft Sp. z o.o.
ul. Wojska Polskiego 3
39-300 Mielec





2 Replies

BS Bartosz Solarski August 26, 2011 08:18 AM UTC

Hi

Button did not indicate the correct DataContext. I added a DataContext bound of View where ElementName is the name of View window view. Valid xaml for the button below. It works fine.





Best regards,

Bartosz Solarski
COMP Soft Sp. z o.o.
ul. Wojska Polskiego 3
39-300 Mielec




RV Ramesh V Syncfusion Team September 13, 2011 04:19 PM UTC

Hi Bartosz,

Thanks for your interest in syncfusion products and also sorry for delay.

We have analyzed the reported issue with our sample and we found that while adding a button with DataTemplate in a grid cell, then the added button will not comes under visual tree. So we cannot access the command in the DataTemplate cell.

Please let us know if you have any queries.

Regards,
Ramesh


Loader.
Up arrow icon