See the tutorials on selection
(http://ui-grid.info/docs/#/tutorial/210_selection) and editing
(http://ui-grid.info/docs/#/tutorial/201_editable) depending on your needs.
There are events built into ui-grid for this.
On Thursday, October 22, 2015 at 2:34:44 PM UTC-4, Suparn Badwaik wrote:
>
> Hi,
>
> I am new with Angularjs and typescript. Can anyone please help me with my
> query ?
>
> I have a very simple grid comprising of 3 columns and a Delete button
> corresponding to each row. The data is bind to the grid as expected.
> *How can i find out which row has been clicked ?*
>
> I was able to achieve this using plain Javascript. I want to write the
> code purely in typescript.
>
> Below is my code if needed to know what i have done.
> code within the constructor of the controller :
> *this.gridOptions = {};*
> * this.gridOptions.columnDefs = [{ name: "Name" }, { name:
> "Language" }, {*
> * name: 'Remove',*
> * cellTemplate: '<button class="btn btn-primaryRemove
> btn-xs" ng-click="grid.appScope.showMe()">Remove</button>'*
> * }];*
>
> Function within the constructor:
> *showMe(): void {*
> * alert("Hi");*
> * }*
>
> Initially, i was trying to find out the row details, but later realized
> that a simple function is not getting called either.
> This works when i tried using javascript with angularjs.
>
> Help needed :
> 1. Why is the function not being called ?
> 2. If the function gets called, how can i get the row details ?
> 3. Can anyone share some good articles or tutorials or any material that
> would help me in using *angular with typescript* ?
>
> Any help would be appreciated. Thank you,
>
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.