Using Commands on Button in Grid Row

5 posts, 1 answers
  1. Laura Edwards
    Laura Edwards avatar
    25 posts
    Member since:
    Jun 2010

    Posted 13 Aug 2010 Link to this post

    I am having an issue where I can not use a command from my view model on a button that is embedded in a grid row. I want to be able to call this command and pass the selected row as the parameter in order to do service calls on the row object selected.

    When I attach the command to the button in the row, nothing happens. When I take the button out of the grid row, the command works just fine.

    Is this a glitch or can you not call a command on a button in a grid row?
  2. Maya
    Admin
    Maya avatar
    4062 posts

    Posted 13 Aug 2010 Link to this post

    Hello Laura Edwards,

    I am sending you a sample project illustrating how to perform a command  that is defined for a button in a row. In this case the command is "Delete" and it removes the item on the same row as the button.
    In case that does not meet your exact requirement, we would need more details about your scenario in order to provide you with a more accurate solution.
     

    Regards,
    Maya
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Laura Edwards
    Laura Edwards avatar
    25 posts
    Member since:
    Jun 2010

    Posted 13 Aug 2010 Link to this post

    It gives me this error:
    Error 3 The property 'AncestorType' does not exist on the type 'RelativeSource' in the XML namespace 'http://schemas.microsoft.com/winfx/2006/xaml/presentation'. 
  5. Answer
    Maya
    Admin
    Maya avatar
    4062 posts

    Posted 16 Aug 2010 Link to this post

    Hello Laura Edwards,

    Please excuse me for the misunderstanding. I am sending you a new - more appropriate for your scenario- project.
     

    Best wishes,
    Maya
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  6. Laura Edwards
    Laura Edwards avatar
    25 posts
    Member since:
    Jun 2010

    Posted 16 Aug 2010 Link to this post

    Thank you. This is exactly what I needed.
Back to Top
DevCraft banner