#1 2017-06-14 10:05:43

reg4app
Member
Registered: 2016-05-16
Posts: 147

How can I trigger a button inside a record row without firing rowclick

as in Sample Report17,Report with 'Table'

I get this in Report's Html,something like:

<td class="bg-success">
 [Record.fcrdate]
 </td>

<td class="bg-success text-center">
<input type="button" class="buttonClassnowidth1" value="Delete" onclick="$parent.test_delete"/>
</td>

when I run the sample ,and click the button in record row,It will call the 'RowClick' event instead of the function 'test_delete'


Joshua.Y

Offline

#2 2017-06-14 10:13:11

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: How can I trigger a button inside a record row without firing rowclick

Hello Joshua,

Please, try with "ng-click" instead of "onclick", just like in the "Report17" sample that you refer.

Offline

#3 2017-06-14 10:27:55

reg4app
Member
Registered: 2016-05-16
Posts: 147

Re: How can I trigger a button inside a record row without firing rowclick

with "ng-click", It will just trigger both the 'RowClick' and my Function 'parent.test_delete'


Joshua.Y

Offline

#4 2017-06-14 10:39:41

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: How can I trigger a button inside a record row without firing rowclick

Hello Joshua,

A possible way to achieve what you wanted is to identify the buttons you are using in the Report HTML, then we can act according to that button's identifiers. Take a look at this modified Report17 sample and tell me if they can work for you.

Offline

#5 2017-06-14 15:39:58

reg4app
Member
Registered: 2016-05-16
Posts: 147

Re: How can I trigger a button inside a record row without firing rowclick

Oh,This is good,This can work  big_smile and big_smile
here in ng-click="$parent.ReportRecordClick(Record.ID)
how can I replace 'Record.ID' with the Report's Index?? 
Reportname.Index seems will not work!


Joshua.Y

Offline

#6 2017-06-14 17:05:04

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,660
Website

Re: How can I trigger a button inside a record row without firing rowclick

Hello Joshua,

Yes; you can use the "$index" word in this way:

$parent.ReportRecordClick($index)

Offline

#7 2017-06-15 11:44:25

reg4app
Member
Registered: 2016-05-16
Posts: 147

Re: How can I trigger a button inside a record row without firing rowclick

Fantastic!
cool


Joshua.Y

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.