We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

TypeError: this.model.currentViewData is undefined

Hi

I got error TypeError: this.model.currentViewData is undefined
this is my datamanager object

 $scope.dataManger = ej.DataManager({
        url: "http://localhost:49279/api/Customers/",
        headers: [{ 'Authorization': 'Bearer XhuZgITuaphkyiL4s1AN3rQzl5Zs8w8ryDcepwBzmWDI5YF8sq_FFXpxBczLTk_pi4NbiGRgN0uLloVPQ6Hg-P-bUnIXLmoCCoezcYPSelh2QCi0KlAww6_RGwkiUHnRecLzZn0yie5DIQ8SPlemV3i3me2ov17hkDbQIbam4B-_mD0imTpyc6x_AM1kpAcfh-RAZUooghh3ibUMq10qIfgKuXJ39nfLqiMEQPYQ4wM' }],
        adaptor: new ej.WebApiAdaptor()
    });

this is my web api action

        [HttpGet]
        [Authorize]
        [Route("api/Customers")]
        public object Get([FromUri]AgTableParamsJson param)
        {
            CustomerRepository repository = new CustomerRepository();
            try
            {
                var queryString = HttpContext.Current.Request.QueryString;
                int skip = Convert.ToInt32(queryString["$skip"]);
                int take = Convert.ToInt32(queryString["$top"]);

/// for test 
startRow = 0, endRow = 9,               
var p = repository.FindPagged(new AgTableParams { startRow = 0, endRow = 9, filterModel = new Dictionary<string, AgTableParamsDetalis>(), sortModel = new AgTableSortParams() }); // AgParams.initParams(param));
                 return new { Items = p.rows, Count = p.rowsCount };
                //return Ok(p);
            }
            catch (Exception e)
            {
                return ResponseMessage(Request.CreateResponse(HttpStatusCode.BadRequest, "Wystąpił nieoczekiwany błąd"));
            }
        }

i get Json wher items and count is not empty, but ejGrid cant show my data.

1 Reply

JK Jayaprakash Kamaraj Syncfusion Team March 22, 2016 09:36 AM UTC

Hi Piotr,

Thanks for contacting Syncfusion support.

We have created the sample with your code example. But, we were unable to reproduce the issue. please share the following information to find the cause of the issue.

1.       Are you using any custom adaptor in your sample?
2.       Full client side code snippet.
3.       Essential studio version details
4.       An issue reproducing sample if possible or sample hosted link or replicate the issue in the following sample
            http://www.syncfusion.com/downloads/support/forum/123472/ze/ServerOperations374811498

Regards,

Jayaprakash K.

Loader.
Up arrow icon