This is a migrated thread and some comments may be shown as answers.

onChange() changes row color

3 Answers 278 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vince
Top achievements
Rank 1
Vince asked on 18 Jan 2017, 03:28 PM

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?

3 Answers, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 20 Jan 2017, 11:14 AM
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.
0
Vince
Top achievements
Rank 1
answered on 20 Jan 2017, 03:37 PM
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.)
0
Konstantin Dikov
Telerik team
answered on 24 Jan 2017, 09:28 AM
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.
Tags
Grid
Asked by
Vince
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Vince
Top achievements
Rank 1
Share this question
or