This is a migrated thread and some comments may be shown as answers.

Grid - 500 Internal ServerError Telerik UI

6 Answers 74 Views
Grid
This is a migrated thread and some comments may be shown as answers.
tram
Top achievements
Rank 1
Veteran
tram asked on 08 Jan 2021, 05:09 PM

I have an issue in Telerik grid...can you please help me 

 

Here is my Grid code

        @(Html.Telerik().Grid<ClassName>()
              .DataBinding(dataBinding => dataBinding.Ajax().OperationMode(GridOperationMode.Client).Select("GetSearchResult", "Work"))
              .Name("SearchResult")
              .Columns(columns =>
                  {
                      columns.Bound(o => o.TicketId)
                      columns.Bound(o => o.TicketName)

                      columns.Bound(o => o.TicketDescription)

)}

.Scrollable(c => c.Height(3000))
              .Sortable()
              .ClientEvents(events => events.OnComplete("onComplete").OnDataBinding("DataBinding").OnDataBound("SearchResultDataBound").OnRowDataBound("RowDataBound")
              .NoRecordsTemplate("...")
              .Pageable(pager => pager.PageSize(30)

)

 

Like this i have 15 columns in Grid, but my Stored Procedure retuns 40 Columns data, and 500 rows.

when the search data is less than 400 rows from Procedure data is showing in UI, But when the result is more than 400 (max 500 recods from Stored Procedure) records i am getting Internal server error alert popup from telerik.common.min.js   ....

i don't understand why this is happening.

can you please help me.

 

 

6 Answers, 1 is accepted

Sort by
0
Anton Mironov
Telerik team
answered on 12 Jan 2021, 12:04 PM

Hello Tram,

Thank you for the provided code snippet and image.

In order to assist with resolving the pointed faulty behavior, I would recommend following the forum answer below:

Another approach that I could recommend is trying the Virtualization of remote data. Here is a demo that represents implementation and behavior:

Give the approaches above a try and let me know if further assistance is needed.


Kind Regards,
Anton Mironov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
tram
Top achievements
Rank 1
Veteran
answered on 27 Jan 2021, 06:44 AM

Hi Anton,

I checked the forum answers,

1) for the first URL all my scripts are registered in correct order

                     "~/Scripts/bootstrap.js",
                     "~/Scripts/kendo/kendo.all.min.js",
                     "~/Scripts/kendo/kendo.aspnetmvc.min.js",
                     "~/Scripts/kendo/jszip.min.js"

2) I tried the Virtualization remote data also

I tried returning the data from controller in different ways like below, and i am getting internal server error.

 1) return new JsonResult() { Data = searchResult.Take(500), JsonRequestBehavior = JsonRequestBehavior.AllowGet,        MaxJsonLength = Int32.MaxValue };
 2) return View(new GridModel<classname> { Data = searchResult });

3) return Json(searchResult);     

//searchResult(it will return the list).

 

in one column we are returning the huge XML from the database, is that the problem?

I tried to restrict the max JsonLength also in the controller.

Can you please help me

Thanks,

Tram

0
tram
Top achievements
Rank 1
Veteran
answered on 28 Jan 2021, 08:45 AM

Hi Anton,

I have done more Analysis and check the Response Content-Length,

if the response Content-Length is more than 2095224 around(2MB), I am getting Internal Server error. if it is less than 2MB, it is working fine.

Please help me,

Thank You,

Tram

 

0
tram
Top achievements
Rank 1
Veteran
answered on 28 Jan 2021, 08:47 AM
Hi Anton,
I have done more Analysis and check the Response Content-Length,
if the response Content-Length is more than 2095224 around(2MB), I am getting Internal Server error. if it is less than 2MB, it is working fine.
Please help me,
Thank You,
Tram
0
Anton Mironov
Telerik team
answered on 28 Jan 2021, 02:34 PM

Hello Tram,

I had just spoken with an expert from the developer's team for the case. The recommendation is to use the following forum threads in order to enlarge the length of the response:

I hope the information above will help in resolving the case. Let me know the result and if needed I will continue with the tries to assist with resolving the faulty behavior.

Best Regards,
Anton Mironov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
tram
Top achievements
Rank 1
Veteran
answered on 05 Feb 2021, 02:20 PM

Hi Anton,

I am able to resolve the issue by following the above links.

Thank you so much for your help.

Thanks,

Tram

Tags
Grid
Asked by
tram
Top achievements
Rank 1
Veteran
Answers by
Anton Mironov
Telerik team
tram
Top achievements
Rank 1
Veteran
Share this question
or