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.
Unfortunately, activation email could not send to your email. Please try again.

TypeError: this.model.currentViewData is undefined

Thread ID:

Created:

Updated:

Platform:

Replies:

123472 Mar 21,2016 03:28 AM Mar 22,2016 05:36 AM JavaScript 1
loading
Tags: ejGrid
Piotr Kaczmraek
Asked On March 21, 2016 03:28 AM

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.

Jayaprakash Kamaraj [Syncfusion]
Replied On March 22, 2016 05:36 AM

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.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;