Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
770
how to add activeRowChanged with mvc helpers
posted

Hi,  i am trying to add an event to the igGrid when they select a row it will execute a java function to enable or disable buttons.  I am not sure where you are at with getting better and more robust documentation for the MVC Helper with IgniteUI but i cannot figure out how to get it working.

Parents
  • 1440
    Suggested Answer
    posted

    Hello Ekolluri,

    I prepared MVC project that demonstrates grid with template buttons within Column Template. Selection behavior is enabled and 'rowSelectionChanged' event is attached to the grid. On this event I'm demonstrating how to disable the button on the currently selected row. This is achieved by accessing the currently selected row object at runtime using the rowIndex and getting reference to the '' element that represents the button, then setting 'disabled' attribute to the input element. Here is some code snippet for instance:

     function disableButton(evt, ui) {
            var rowIndex = ui.row.index;
            var row = $("#igGrid1").igGrid("rowAt", rowIndex);
            row.children[3].children[0].setAttribute("disabled", true);
        }

    Please review the attached sample and let me know if it meets your requirements.

    MvcGridDisableButtons.zip
Reply Children
No Data