How to bind Grid Commands to MVVM attributes

3 posts, 0 answers
  1. Grant
    Grant avatar
    113 posts
    Member since:
    Jul 2016

    Posted 22 Jun Link to this post

    Hi there, 

    So as my title says Im trying to bind an MVVM attribute to a Grid command button, its a custom command if that makes a difference. The reason being is that one of my commands is to 'Setup' a record, but setting up a record is dependent on the status of another field that is in the MVVM.

    Please advise on how I can proceed, I see there have been a few post about this a couple years ago before without resolution. Everyone just seems to be falling back to using jQuery, but i dont want to have to do that.

    Thanks,
    Grant

  2. Georgi
    Admin
    Georgi avatar
    368 posts

    Posted 26 Jun Link to this post

    Hi Grant,

    Based on the provided information I assume that the requirement is to bind a certain attribute of the custom command to a field of the model. Please correct me if I am wrong.

    A possible solution is to use Attribute Binding:


    Below you will find a small sample which demonstrates how to bind an attribute of a custom command to a field of the model:



    Regards,
    Georgi
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Grant
    Grant avatar
    113 posts
    Member since:
    Jul 2016

    Posted 26 Jun in reply to Georgi Link to this post

    Morning Georgi, 

    Thanks so much, this is great.Its very similar to what im trying to do, but it answers my question perfectly.

    Regards,
    Grant

Back to Top