charlespockert / aurelia-bs-grid

Aurelia and Bootstrap powered datagrid control
MIT License
45 stars 21 forks source link

Binding issue after beta release #72

Open cerealBoxx opened 8 years ago

cerealBoxx commented 8 years ago

I'm trying to use the grid but after the changes this no longer works:

         <button click.delegate="$parent.$parent.callAddDialog($item)" class="btn btn-primary"><i class="fa fa-edit fa-lg"></i>&nbsp;<span>${'common.edit' | t}</span></button>

I get an error that there is no callAddDialog function. I tried with one $parent, two, three, four and even five but I couldn't address the view model. Any help would be apreciated.

I'm calling the same function from another part of the code and it's working properly. The button is within the grid just to make sure - in a grid cell.

charlespockert commented 8 years ago

@cerealBoxx I'm wondering if this is to do with the flattening of the contexts in Aurelia. You are not required to use $parent any more (but the plugin hasn't been updated to address this) - when I get round to working on this I'll remove the need for $parent from this plugin.

uwascan commented 8 years ago

Hi, I am using the latest Aurelia bits and I am having this exact same issue. Any guidance on how to fix this? I am willing to try.

charlespockert commented 8 years ago

@uwascan for now you might want to check out this fork: https://github.com/corneliutusnea/aurelia-grid - at some point I'll probably be working on that but at the moment there probably won't be much progress on this (I just don't have any time right now!)

uwascan commented 8 years ago

That grid implementation has the same problem, but I found a solution which I posted in an issue on the repo above. I might send a PR if I get the chance. I think you should apply this fix because any time you google for an Aurelia data grid, this repo is usually first on the list.

Cheers

ManojRanga commented 7 years ago

@charlespockert Is this issue resolved?? I am using java script. I am facing the same issue. How can I solve this issue in java script. I tried using $parent once and twice, still that didn't work. Please help me to resolve this issue.

activebiz commented 7 years ago

I am having same issue. Please help !