Overseas634
Overseas634

Reputation: 47

ui.grid row not able to select row

$scope.myData = [{name: "Moroni", Date:
     "01-1-2015",country:"india",address:"address"},
                 ];
$scope.gridOptions = { 
    data: 'myData',
    enableRowSelection:true,
};

<div flex>
<div class="gridStyle" ui.grid="gridOptions"> </div> 
</div flex>

I have angular version 1.3.15 and i have installed angular ui-grid. after running my app it shows grid but not able to select row

Upvotes: 2

Views: 6791

Answers (1)

technoSpino
technoSpino

Reputation: 510

<div class="gridStyle" ui.grid="gridOptions"> </div> 

needs to be

<div class="gridStyle" ui-grid-selection ui-grid="gridOptions"> </div> 

You also need to add the module ui.grid.selection to your dependencies. Be sure to keep your '.' and minuses straight. Sometimes it doesn't matter until it does.

See UI-Grid Selection For more details

Upvotes: 13

Related Questions