onChange() changes row color

4 posts, 0 answers
  1. Vince
    Vince avatar
    13 posts
    Member since:
    Dec 2016

    Posted 18 Jan 2017 Link to this post

    Hi Team.

    I'm using a onChange event to select the row in a grid. When I select a row, an event will be triggered. Also, the color of the row is changing automatically to let me know which row is selected. Now, I have a custom command column, which is a button linked with another js function. I want to achieve that when I click the button, the onChange() of this row is also triggered. Is that possible?

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 20 Jan 2017 Link to this post

    Hello Vince,

    The OnChange event will fire when a row is selected, so I am not sure that I understand the scenario that you have and why are you selecting a row within the OnChange event (I am guessing you are selecting a row in a different grid). Nevertheless, from the event handler of the custom command button that you have you can get reference to the TR element and use the Grid select method to select that particular row:

    Best Regards,
    Konstantin Dikov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Vince
    Vince avatar
    13 posts
    Member since:
    Dec 2016

    Posted 20 Jan 2017 in reply to Konstantin Dikov Link to this post

    Hi, my scenario  is that I have a custom command column(button). And there are two functions. One is for OnChange event(selecting a row). Another one is for custom command button. Now I want that when I click the button, the button event is triggered. Also, the Onchange event should be triggered. (It doesn't matter which one is triggered first.)
  4. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 24 Jan 2017 Link to this post

    Hello Vince,

    Please refer to my previous post, where you will find the necessary information for achieving the desired result.


    Regards,
    Konstantin Dikov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top