UI grid while row rendering for each row making service call
#5,336 opened on Apr 20, 2016
Description
Hi Friend , I am new to the UI grid and Angularjs . Me facing one issue in ui-grid row rendering.
From the service getting JSON response data . JSON having array of 10 objects. After getting the response set to the $scope.gridOption.data = response data.
in bebugging mode if you check console its rendering 100 time response ; it means my grid having 10 columns and My json having 10 object (10x10). I am not sure how to solve this . Please do the needful . Pleasse find the below screen shot .
Service call :

Service layer :

Console :

JSON :
{ "name": "Rain X", "customer": "customer2", "owner": "Larry Zeiss", "location": "Portland", "event_photo": "photoURL", "status": 2, "retailer":"Kroger - Atlanta", "store":"255", "city":"Westchester", "pod":"1234", "eventprograms":"FasWax", "eventid" :"112", "nomessages" :[ { "islive":false, "messages":5 } ], "hosts": [ { "id": "userid", "place": "placeId"
}
],
"schedules": [
{
"start_time":"",
"end_time": "3:30pm"
}
],
"photos": [
{
"photo": "../../../images/flower.png",
"instructions": "",
"status": 3,
"time":"13:30pm",
"status_message" :"Event complete",
"id":5
},
{
"photo": "../../../images/Koala.jpg",
"instructions": "",
"status": 3,
"time":"13:30pm",
"status_message" :"Event complete",
"id":1
},
{
"photo": "../../../images/Tulips.jpg",
"instructions": "",
"status": 3,
"time":"13:30pm",
"status_message" :"Event complete",
"id":2
},
{
"photo": "../../../images/flower.png",
"instructions": "",
"status": 3,
"time":"13:30pm",
"status_message" :"6 Photos Approved",
"id":3
},
{
"photo": "../../../images/flower.png",
"instructions": "",
"status": 3,
"time":"13:30pm",
"status_message" :"Event complete",
"id":4
},
{
"photo": "../../../images/flower.png",
"instructions": "",
"status": 3,
"time":"13:30pm",
"status_message" :"Event complete",
"id":0
}
]
}
Thanks Praveen.B