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

Row virtualization grouping - Odd behavior

28 Answers 253 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pierrick
Top achievements
Rank 1
Pierrick asked on 03 Jul 2020, 07:43 AM

Hello,

I'm trying to implement a grid with row virtualization and groups, based on this example : https://demos.telerik.com/aspnet-mvc/grid/server-grouppaging-virtualization . But I see an odd behavior. When I group rows on two columns, then expand the first level group, in my case, there is no filter sent to the server, only group.

Here is the request sent by the grid in my case : 

sort:
page: 1
pageSize: 50
group: RAISONSOCIALE-asc~LIBELLERIB-asc
filter:
take: 50
skip: 0
groupPaging: true

 

And here is the one in the example I use :

sort:
page: 1
pageSize: 50
group: CompanyName-asc
filter: City~eq~'Shady Point'
skip: 0
take: 50
groupPaging: true

 

Here is the grid : 

Html.Kendo().Grid<SomeObject>()
    .Name("ForecastListGrid")
    .Groupable()
    .Columns(columns =>
    {
        columns.Select().Width(50).HtmlAttributes(new { @class = "checkbox-align" }).HeaderHtmlAttributes(new { @class = "checkbox-align" });
        columns.Bound(p => p.RAISONSOCIALE);
        columns.Bound(p => p.CODE_FLUX);
        columns.Bound(p => p.DATE_O).Width(100).Encoded(false).ClientTemplate("#=kendo.toString(kendo.parseDate(DATE_O,'dd/MM/yyyy'), '" + "dd/MM/yyyy" + "')#");
        columns.Bound(p => p.DATE_V).Width(100).Encoded(false).ClientTemplate("#=kendo.toString(kendo.parseDate(DATE_V,'dd/MM/yyyy'), '" + "dd/MM/yyyy" + "')#"); ;
        columns.Bound(p => p.NOMBRE);
        columns.Bound(p => p.LIBELLE);
        columns.Bound(p => p.REFERENCE);
    })
    .Scrollable(scrollable => scrollable.Virtual(true))
    .Height(500)
    .DataSource(dataSource => dataSource
        .Ajax()
        .Events(events =>
            events.Error("error_handler")
        )
        .Model(model =>
        {
            model.Id(p => p.ID);
        })
        .GroupPaging(true)
        .PageSize(50)
        .Read("LoadGrid", "Test")
    )

 

Is there something I'm missing ?

Thanks !

28 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 07 Jul 2020, 07:50 AM

Hello Pierrick,

 

I examined the provided configuration of the Grid and it looks fine to me. 

That said, one thing that could cause the behavior is using an older version of the Kendo scripts. Please make sure that all JavaScript files are from the latest version of the components. The CSS files should also have a matching version to avoid any appearance issues. 

 

After referencing the latest scripts and running the application make sure to do a hard refresh in the browser to ensure it requests all resources again.

 

Regards,
Viktor Tachev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Pierrick
Top achievements
Rank 1
answered on 10 Jul 2020, 12:38 PM

Thank you for your help. As you pointed out, there was a difference of version between the dll and js files. Now, all is in 2020.2.617.545 version. Unfortunately, it didn't solve the issue.

So, I've done some more tests. In the first place, I used the DataSourceRequest object to create a SQL query in order to fetch precisely the needed data. Then it was transformed to be usable by the Grid.

In my last test, I got rid of that to simplify as much as possible. Here's the result :

public ActionResult LoadGrid([DataSourceRequest]DataSourceRequest request)
{
    List<TRE_ECRITURES_PEntity> data = new TRE_ECRITURES_PService().AllData();
    var result = data.ToDataSourceResult(request);
    return Json(result);
}

 

First, it retrieves all data, then processed with IEnumerable.ToDataSourceResult(DataSourceRequest) from Kendo.Mvc.Extensions namespace. Lastly, it's converted in json, and sent back to the Grid.

When I run this, at first it works fine. Then I group on one column. Still works. But with a second group, it always throw an exception on the json conversion : System.ArgumentNullException, Value cannot be null. Parameter name : source.

   at System.Linq.Enumerable.OfType[TResult](IEnumerable source)
   at Kendo.Mvc.Infrastructure.Group.InitializeSubgroups()
   at Kendo.Mvc.Infrastructure.Group.get_Subgroups()

Neither of the two columns I'm trying to group are empty or null.

Thanks !

0
Tsvetomir
Telerik team
answered on 14 Jul 2020, 11:17 AM

Hi Pierrick,

My name is Tsvetomir and I am covering for my colleague Viktor.

It is great that you have let the DataSource extension method handle the format of the response. I have noticed that all of the needed options in the grid and data source are correctly set.

In our live demo, I have performed various tests and I have not noticed any server-side exceptions or error at all. Could you try replicating the issue with our live demo below?

https://demos.telerik.com/aspnet-mvc/grid/server-grouppaging-virtualization

In order for me to be maximally efficient, I would need to investigate the defect locally. Is it convenient for you to create an example in which the server-side error can be replicated?

 

Kind regards,
Tsvetomir
Progress Telerik

0
Pierrick
Top achievements
Rank 1
answered on 17 Jul 2020, 10:40 AM

Hello Tsvetomir,

I can confirm that I never had this error in the live demo.

I made you an example. I just created a new "Telerik ASP.Net MVC Application" (version 2020.2.617.545), and made a few changes. I added ExampleModel.cs in the Models folder, changed the GridController.cs and Index.cshtml files. Finally, I added "reduceddata.json" next to the .csproj file.

It is the simplest example I could make, that allow to reproduce the problem. With that, wherever I try to group data on 2 columns, I get the error.

You can find all needed files in the attached archive.

Thank you for your help.

0
Tsvetomir
Telerik team
answered on 21 Jul 2020, 09:50 AM

Hi Pierrick,

Thank you for the provided code snippets that are needed to replicate the issue. Indeed, I managed to replicate it and it has already been reported and fixed (it is ready to be tested by the QA team). The fix will be live with any of the next releases. 

https://github.com/telerik/kendo-ui-core/issues/5876

 

Kind regards,
Tsvetomir
Progress Telerik

0
Geetha
Top achievements
Rank 1
Veteran
answered on 27 Aug 2020, 09:17 AM
Hello Tsvetomir, i have the same issue in my application, what is the fix and how can it be resolved, where should i find the code for it?
0
Tsvetomir
Telerik team
answered on 28 Aug 2020, 02:44 PM

Hi Geetha,

I am happy to inform you that the fix has passed the testing phase and it will be available with the very next release of the Kendo UI library. It is planned for mid-September. At present, there is no workaround that could be used. 

 

Regards,
Tsvetomir
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

0
Geetha
Top achievements
Rank 1
Veteran
answered on 16 Sep 2020, 08:44 AM

Hello Tsvetomir, I recieved an update today for telerik asp.net MVC with relaese notes mentioning the upgrades to the grid(https://www.telerik.com/support/whats-new/aspnet-mvc/release-history/ui-for-asp-net-mvc-r3-2020).

 

How should i change the code in the controller to resolve the abve mentioned problem? could you please assist us, as this is on a higher priority in our application.

 

Regards,

Geetha Naidu

0
Tsvetomir
Telerik team
answered on 17 Sep 2020, 10:44 AM

Hi Geetha,

No changes are needed in order to have the group virtualization working as expected. All that is needed to be done is to update the Kendo.Mvc.dll - the source for the server-side widget and the version of the client-side resources - CSS and JavaScript. 

Can you confirm whether the issue is present after upgrading to 2020 R3 version?

 

Best regards,
Tsvetomir
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

0
Geetha
Top achievements
Rank 1
Veteran
answered on 18 Sep 2020, 07:05 AM

Hello Tsvetomir, Thank you for replying, yes i did updated my webapplication with 2020.3.915.545 version of Kendp.MVC.dll css and js files, i tried to run the application, but the problem still exist. How to go about this?

Regards,

NAIDU Geetha

0
Tsvetomir
Telerik team
answered on 18 Sep 2020, 01:29 PM

Hi Geetha,

I can confirm that with the latest version of the Kendo UI library, I can not replicate the issue. Therefore, grouping by two fields and expanding a group, a server error is not being thrown. 

Please find attached an example with the latest version applied.

Is there a chance that you have upgraded the dlls, however, the references from the project to be pointing to the previous version?

 

Regards,
Tsvetomir
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
Geetha
Top achievements
Rank 1
Veteran
answered on 28 Sep 2020, 10:25 AM

Hello Tsvetomir , Thank you for sending use a sample, i did run the sample, it works great. 

I have few questions from the above sample, like in the function LoadGrid you are actually retrieving the whole list, is it necessary to do this? in my application i have millions of records. I tried doing it but the expandGrouping is infinite and never displays the result. 

 

The current secnario in our application is bit complicated, the list retirved is a List<dynamic> expandGrouping is infinite and never displays the result.

Can you help me how to resolved these issues?

 

Regards,

Geetha

0
Tsvetomir
Telerik team
answered on 30 Sep 2020, 09:20 AM

Hi Pierrick,

The Kendo UI DataSourceResult object works with IQueryable collections as well. There is no need to request all of the data at once on the server and return only a portion. The example that I provided is for testing purposes only. 

For instance, the following demo is not bound directly to a list of items:

https://demos.telerik.com/aspnet-mvc/grid/server-grouppaging-virtualization

Its server-side implementation can be observed in our dedicated repository for data services at:

https://github.com/telerik/kendo-ui-demos-service/tree/master/graphql/graphql-aspnet-core

If there is anything else I can help with, let me know.

 

Kind regards,
Tsvetomir
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Geetha
Top achievements
Rank 1
Veteran
answered on 30 Sep 2020, 10:12 AM

Hello Tsvetomir, Thank you, yes the example works, but i my code when i expand a group i get this httpresponse below 

{"Data":null,"Total":1,"AggregateResults":null,"Errors":null}

I am unable to figure out why the Data is null when i expand a group. can you help me on this? this is very important task in my project and almost all the pages with grid needs this functionality

 

Regards,

Geetha

0
Tsvetomir
Telerik team
answered on 01 Oct 2020, 12:55 PM

Hi Pierrick,

The actual server grouping functionality depends on several AJAX requests in order to display the correct data item. This is due to the fact that the actual group is regarded as a separate data item even though it is not present in the database. 

However, returning no data with the READ requests is not the desired behavior. Nevertheless, I did not manage to replicate the issue locally.

Is it possible for you to share a sample where the described behavior can be observed? For instance, take the sample from one of my previous responses and modify it in order to replicate the defect. I will then investigate it and get back to you with the respective suggestions.

Thank you for your cooperation.

 

Kind regards,
Tsvetomir
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Geetha
Top achievements
Rank 1
Veteran
answered on 01 Oct 2020, 03:29 PM

Hello Tsvetomir, thank you for confirmation, below is the exception i get when i try to group the list. I am attaching the project here to test.

Server Error in '/' Application.<br><br> Value cannot be null.<br>Parameter name: source <br> Description: An unhandled exception occurred during
the execution of the current web request. Please review the stack trace
for more information about the error and where it originated in the
code.
<br><br> Exception Details: System.ArgumentNullException: Value cannot be null.<br>Parameter name: source<br><br>Source Error: <br><br> An unhandled exception was generated during the execution of the current
 web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.     
                <br>Stack Trace: <br><br>[ArgumentNullException: Value cannot be null.
Parameter name: source]
   System.Linq.Enumerable.OfType(IEnumerable source) +4957832
   Kendo.Mvc.Extensions.DataTableWrapperExtensions.SerializeToDictionary(IEnumerable enumerable, DataTable ownerDataTable) +144
   Kendo.Mvc.Extensions.DataTableWrapperExtensions.SerializeGroupItem(DataTable ownerDataTable, IGroup group) +141
   Kendo.Mvc.Extensions.<>c__DisplayClass1_0.<SerializeToDictionary>b__0(IGroup group) +8
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +167
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeEnumerable(IEnumerable enumerable, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +72
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +1280
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +195
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeCustomObject(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +481
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +1325
   System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +195
   System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat) +29
   System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat) +64
   System.Web.Mvc.JsonResult.ExecuteResult(ControllerContext context) +343
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +56
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +52
   System.Web.Mvc.Async.<>c__DisplayClass3_6.<BeginInvokeAction>b__4() +198
   System.Web.Mvc.Async.<>c__DisplayClass3_1.<BeginInvokeAction>b__1(IAsyncResult asyncResult) +100
   System.Web.Mvc.Async.WrappedAsyncResult`1.CallEndDelegate(IAsyncResult asyncResult) +10
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27
   System.Web.Mvc.<>c.<BeginExecuteCore>b__152_1(IAsyncResult asyncResult, ExecuteCoreState innerState) +11
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +45
   System.Web.Mvc.<>c.<BeginExecute>b__151_2(IAsyncResult asyncResult, Controller controller) +13
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +22
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +26
   System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10
   System.Web.Mvc.<>c.<BeginProcessRequest>b__20_1(IAsyncResult asyncResult, ProcessRequestState innerState) +28
   System.Web.Mvc.Async.WrappedAsyncVoid`1.CallEndDelegate(IAsyncResult asyncResult) +29
   System.Web.Mvc.Async.WrappedAsyncResultBase`1.End() +49
   System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28
   System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9847873
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +50
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +163
0
Geetha
Top achievements
Rank 1
Veteran
answered on 01 Oct 2020, 03:31 PM
here is the attached files
0
Geetha
Top achievements
Rank 1
Veteran
answered on 01 Oct 2020, 03:39 PM
I am unable to upload complete solution and hence i am uploading just the files i have modified, please use them in the previous application and test it.
0
Tsvetomir
Telerik team
answered on 05 Oct 2020, 01:02 PM

Hi Geetha,

Thank you for the provided code snippets. Indeed, the issue can be replicated when the grid is bound to a DataTable and the GroupPaging option of the data source is used. 

With that said, I would need more time to investigate the issue. The moment I have any findings, I will contact you immediately.

 

Kind regards,
Tsvetomir
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Geetha
Top achievements
Rank 1
Veteran
answered on 07 Oct 2020, 01:52 PM

Hello Tsvetomir, Thank you for your quick reply, indeed 90% of our aplication pages contains grid in some way or the other, and GroupPaging is enabled for all of them with virtualization. We need your help to resolve this problem as soon as possible. In case can you provide us the Implementation of the QueryableExtensions class?

 

Regards,

NAIDU Geetha

0
Tsvetomir
Telerik team
answered on 07 Oct 2020, 02:03 PM

Hi Geetha,

I have observed the behavior in detail and I can confirm that this is a bug on our side. I have created a feedback portal item and you could track its progress here:

https://feedback.telerik.com/aspnet-mvc/1488884-grid-grouppaging-throws-server-error-when-the-bound-to-datatable

As present, there is no workaround available due to the fact that the implementation in C# has to be modified. However, this would require the precompilation of the Kendo.Mvc.dll.

 

Kind regards,
Tsvetomir
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Geetha
Top achievements
Rank 1
Veteran
answered on 08 Oct 2020, 09:31 AM

Hi Tsvetomir, Than you for the reply, i have some other problem with Grid grouping, on grouping all the rows must be expanded, i am using the below code to achieve it.

function onDataBound(e) {<br>    var grid = this;<br>    grid.table.find("tr").each(function () {<br>        var dataItem = grid.dataItem(this);<br>        if (dataItem !== undefined) {<br>            var type = dataItem.Discontinued ? 'success' : 'error';<br>            var text = dataItem.Discontinued ? 'available' : 'not available';<br>        }<br><br>        $(this).find('script').each(function () {<br>            eval($(this).html());<br>        });<br>        kendo.bind($(this), dataItem);<br>   <br>        var groupsToExpand = e.sender.tbody.find(".k-grouping-row:not(Discontinued)");<br>        groupsToExpand.each(function (e) {<br>            grid.expandGroup(this);<br>        });<br>    });<br>}

This works correctly for one column grouping when i use,

var groupsToExpand = e.sender.tbody.find(".k-grouping-row");

 

but for multiple columns grouping, i tried this code

var groupsToExpand = e.sender.tbody.find(".k-grouping-row:not(Discontinued)");

 

I get javascript errors below. Could you please help me to resolve this issue?

Uncaught RangeError: Maximum call stack size exceeded<br>    at n.fn.init.prepend (jquery-1.12.4.min.js:3)<br>    at n.fn.init.n.fn.<computed> [as prependTo] (jquery-1.12.4.min.js:3)<br>    at Object.progress (kendo.all.js:2473)<br>    at init._progress (kendo.all.js:70120)<br>    at init.expandGroup (kendo.all.js:69734)<br>    at HTMLTableRowElement.<anonymous> (ecritures_financements.js:133)<br>    at Function.each (jquery-1.12.4.min.js:2)<br>    at R.fn.init.each (jquery-1.12.4.min.js:2)<br>    at HTMLTableRowElement.<anonymous> (ecritures_financements.js:128)<br>    at Function.each (jquery-1.12.4.min.js:2)<br>kendo.all.js:238 Uncaught Error: Invalid template:'<tr class="k-master-row" data-uid="#=data.uid#" role='row'><td class="k-group-cell">&nbsp;</td><td class="k-group-cell">&nbsp;</td><td class="checkbox-align" aria-describedby='5adbc236-5beb-423c-8858-1aa092c44963' role='gridcell'><input class="k-checkbox" data-role="checkbox" aria-label="Select row" aria-checked="false" type="checkbox"></td><td  aria-describedby='1e6068e6-b179-4efa-b422-c3db1b5300ec' role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['Nature'] ? '<span class="k-dirty"></span>' : '' ##var v ={"0":"Placement","1":"Financement"}##var f = v[Nature]#${f != null ? f : ''}</td><td  aria-describedby='e1643122-3bfa-499c-b860-4f25748bee38' role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['DenominationSociete'] ? '<span class="k-dirty"></span>' : '' ##:data.DenominationSociete==null?'':data.DenominationSociete#</td><td  aria-describedby='baaaf416-7e13-4e90-a81b-e985fa20a9d5' role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['CodeBanque'] ? '<span class="k-dirty"></span>' : '' ##:data.CodeBanque==null?'':data.CodeBanque#</td><td  aria-describedby='2b268417-fba0-4b2d-80d5-678232ee1c81' role='gridcell'><span>#:Type#</span></td><td  aria-describedby='c5644dc4-c40b-4562-b280-2b46fab81b95' role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['Libelle'] ? '<span class="k-dirty"></span>' : '' ##:data.Libelle==null?'':data.Libelle#</td><td class="montant-align-right" aria-describedby='b7494e7a-e4eb-434b-a4be-a46f23e6d4f4' role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['Montant'] ? '<span class="k-dirty"></span>' : '' ##:kendo.format("{0:n2\}",data.Montant==null?'':data.Montant)#</td><td  aria-describedby='e3d2cb9a-01dd-4622-b2b9-b377c71991d0' role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['Devise'] ? '<span class="k-dirty"></span>' : '' ##:data.Devise==null?'':data.Devise#</td><td  aria-describedby='20cf5365-9aaf-4a4a-9443-00919607294a' role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['DateDebut'] ? '<span class="k-dirty"></span>' : '' ##=kendo.toString(DateDebut, 'dd/MM/yyyy')#</td><td  aria-describedby='bed0779d-d5eb-4c5e-9d50-7f3587457462' role='gridcell'>#= data && data.dirty && data.dirtyFields && data.dirtyFields['DateFin'] ? '<span class="k-dirty"></span>' : '' ##=kendo.toString(DateFin, 'dd/MM/yyyy')#</td></tr>' Generated code:'var $kendoOutput, $kendoHtmlEncode = kendo.htmlEncode;with(data){$kendoOutput='<tr class="k-master-row" data-uid="'+(data.uid)+'" role=\'row\'><td class="k-group-cell">&nbsp;</td><td class="k-group-cell">&nbsp;</td><td class="checkbox-align" aria-describedby=\'5adbc236-5beb-423c-8858-1aa092c44963\' role=\'gridcell\'><input class="k-checkbox" data-role="checkbox" aria-label="Select row" aria-checked="false" type="checkbox"></td><td  aria-describedby=\'1e6068e6-b179-4efa-b422-c3db1b5300ec\' role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['Nature'] ? '<span class="k-dirty"></span>' : '' )+'';var v ={"0":"Placement","1":"Financement"};$kendoOutput+='';var f = v[Nature];$kendoOutput+=''+($kendoHtmlEncode(f != null ? f : ''))+'</td><td  aria-describedby=\'e1643122-3bfa-499c-b860-4f25748bee38\' role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['DenominationSociete'] ? '<span class="k-dirty"></span>' : '' )+''+$kendoHtmlEncode(data.DenominationSociete==null?'':data.DenominationSociete)+'</td><td  aria-describedby=\'baaaf416-7e13-4e90-a81b-e985fa20a9d5\' role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['CodeBanque'] ? '<span class="k-dirty"></span>' : '' )+''+$kendoHtmlEncode(data.CodeBanque==null?'':data.CodeBanque)+'</td><td  aria-describedby=\'2b268417-fba0-4b2d-80d5-678232ee1c81\' role=\'gridcell\'><span>'+$kendoHtmlEncode(Type)+'</span></td><td  aria-describedby=\'c5644dc4-c40b-4562-b280-2b46fab81b95\' role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['Libelle'] ? '<span class="k-dirty"></span>' : '' )+''+$kendoHtmlEncode(data.Libelle==null?'':data.Libelle)+'</td><td class="montant-align-right" aria-describedby=\'b7494e7a-e4eb-434b-a4be-a46f23e6d4f4\' role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['Montant'] ? '<span class="k-dirty"></span>' : '' )+''+$kendoHtmlEncode(kendo.format("{0:n2}",data.Montant==null?'':data.Montant))+'</td><td  aria-describedby=\'e3d2cb9a-01dd-4622-b2b9-b377c71991d0\' role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['Devise'] ? '<span class="k-dirty"></span>' : '' )+''+$kendoHtmlEncode(data.Devise==null?'':data.Devise)+'</td><td  aria-describedby=\'20cf5365-9aaf-4a4a-9443-00919607294a\' role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['DateDebut'] ? '<span class="k-dirty"></span>' : '' )+''+(kendo.toString(DateDebut, 'dd/MM/yyyy'))+'</td><td  aria-describedby=\'bed0779d-d5eb-4c5e-9d50-7f3587457462\' role=\'gridcell\'>'+( data && data.dirty && data.dirtyFields && data.dirtyFields['DateFin'] ? '<span class="k-dirty"></span>' : '' )+''+(kendo.toString(DateFin, 'dd/MM/yyyy'))+'</td></tr>';}return $kendoOutput;'<br>    at Object.compile (kendo.all.js:238)<br>    at Object.d [as template] (jquery-1.12.4.min.js:2)<br>    at init._tmpl (kendo.all.js:68681)<br>    at init._templates (kendo.all.js:68835)<br>    at init.refresh (kendo.all.js:70201)<br>    at init.d (jquery-1.12.4.min.js:2)<br>    at init.trigger (kendo.all.js:164)<br>    at init._process (kendo.all.js:7941)<br>    at init._processRangeData (kendo.all.js:8820)<br>    at init.range (kendo.all.js:8651)<br>compile @ kendo.all.js:238<br>d @ jquery-1.12.4.min.js:2<br>_tmpl @ kendo.all.js:68681<br>_templates @ kendo.all.js:68835<br>refresh @ kendo.all.js:70201<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @ ecritures_financements.js:115<br>trigger @ kendo.all.js:164<br>refresh @ kendo.all.js:70258<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @ ecritures_financements.js:115<br>trigger @ kendo.all.js:164<br>refresh @ kendo.all.js:70258<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @ ecritures_financements.js:115<br>trigger @ kendo.all.js:164<br>refresh @ kendo.all.js:70258<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @ ecritures_financements.js:115<br>trigger @ kendo.all.js:164<br>refresh @ kendo.all.js:70258<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @ ecritures_financements.js:115<br>trigger @ kendo.all.js:164<br>refresh @ kendo.all.js:70258<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @ ecritures_financements.js:115<br>trigger @ kendo.all.js:164<br>refresh @ kendo.all.js:70258<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @ ecritures_financements.js:115<br>trigger @ kendo.all.js:164<br>refresh @ kendo.all.js:70258<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @ ecritures_financements.js:115<br>trigger @ kendo.all.js:164<br>refresh @ kendo.all.js:70258<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @ ecritures_financements.js:115<br>trigger @ kendo.all.js:164<br>refresh @ kendo.all.js:70258<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @ ecritures_financements.js:115<br>trigger @ kendo.all.js:164<br>refresh @ kendo.all.js:70258<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @ ecritures_financements.js:115<br>trigger @ kendo.all.js:164<br>refresh @ kendo.all.js:70258<br>d @ jquery-1.12.4.min.js:2<br>trigger @ kendo.all.js:164<br>_process @ kendo.all.js:7941<br>_processRangeData @ kendo.all.js:8820<br>range @ kendo.all.js:8651<br>expandGroup @ kendo.all.js:69735<br>(anonymous) @ ecritures_financements.js:133<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>(anonymous) @ ecritures_financements.js:128<br>each @ jquery-1.12.4.min.js:2<br>each @ jquery-1.12.4.min.js:2<br>onDataBound @

ecritures_financements.js:115
trigger @ kendo.all.js:164
refresh @ kendo.all.js:70258
d @ jquery-1.12.4.min.js:2
trigger @ kendo.all.js:164
_process @ kendo.all.js:7941
_processRangeData @ kendo.all.js:8820
range @ kendo.all.js:8651
expandGroup @ kendo.all.js:69735
(anonymous) @ ecritures_financements.js:133
each @ jquery-1.12.4.min.js:2
each @ jquery-1.12.4.min.js:2
(anonymous) @ ecritures_financements.js:128
each @ jquery-1.12.4.min.js:2
each @ jquery-1.12.4.min.js:2
onDataBound @ ecritures_financements.js:115
trigger @ kendo.all.js:164
refresh @ kendo.all.js:70258
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
read @ kendo.all.js:6404
read @ kendo.aspnetmvc.js:257
(anonymous) @ kendo.all.js:8186
_queueRequest @ kendo.all.js:7790
(anonymous) @ kendo.all.js:8184
setTimeout (async)
getGroupItems @ kendo.all.js:8183
_findGroupedRange @ kendo.all.js:8100
_findRange @ kendo.all.js:8711
range @ kendo.all.js:8649
(anonymous) @ kendo.all.js:8252
n.success @ kendo.all.js:6404
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
read @ kendo.all.js:6404
read @ kendo.aspnetmvc.js:257
(anonymous) @ kendo.all.js:8222
_queueRequest @ kendo.all.js:7790
(anonymous) @ kendo.all.js:8220
setTimeout (async)
getGroupSubGroupCount @ kendo.all.js:8219
_findGroupedRange @ kendo.all.js:8088
_findRange @ kendo.all.js:8711
range @ kendo.all.js:8649
(anonymous) @ kendo.all.js:8284
n.success @ kendo.all.js:6404
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
read @ kendo.all.js:6404
read @ kendo.aspnetmvc.js:257
(anonymous) @ kendo.all.js:8186
_queueRequest @ kendo.all.js:7790
(anonymous) @ kendo.all.js:8184
setTimeout (async)
getGroupItems @ kendo.all.js:8183
_findGroupedRange @ kendo.all.js:8100
_findRange @ kendo.all.js:8711
range @ kendo.all.js:8649
(anonymous) @ kendo.all.js:8252
n.success @ kendo.all.js:6404
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
read @ kendo.all.js:6404
read @ kendo.aspnetmvc.js:257
(anonymous) @ kendo.all.js:8222
_queueRequest @ kendo.all.js:7790
(anonymous) @ kendo.all.js:8220
setTimeout (async)
getGroupSubGroupCount @ kendo.all.js:8219
_findGroupedRange @ kendo.all.js:8088
_findRange @ kendo.all.js:8711
range @ kendo.all.js:8649
expandGroup @ kendo.all.js:69735
(anonymous) @ ecritures_financements.js:133
each @ jquery-1.12.4.min.js:2
each @ jquery-1.12.4.min.js:2
(anonymous) @ ecritures_financements.js:128
each @ jquery-1.12.4.min.js:2
each @ jquery-1.12.4.min.js:2
onDataBound @ ecritures_financements.js:115
trigger @ kendo.all.js:164
refresh @ kendo.all.js:70258
d @ jquery-1.12.4.min.js:2
trigger @ kendo.all.js:164
_process @ kendo.all.js:7941
success @ kendo.all.js:7637
success @ kendo.all.js:7528
n.success @ kendo.all.js:6404
i @ jquery-1.12.4.min.js:2
fireWith @ jquery-1.12.4.min.js:2
y @ jquery-1.12.4.min.js:4
c @ jquery-1.12.4.min.js:4
XMLHttpRequest.send (async)
send @ jquery-1.12.4.min.js:4
ajax @ jquery-1.12.4.min.js:4
read @ kendo.all.js:6404
read @ kendo.aspnetmvc.js:257
(anonymous) @ kendo.all.js:7524
_queueRequest @ kendo.all.js:7790
read @ kendo.all.js:7517
query @ kendo.all.js:8034
_query @ kendo.all.js:8397
group @ kendo.all.js:8484
_change @ kendo.all.js:28088
drop @ kendo.all.js:27891
trigger @ kendo.all.js:164
_trigger @ kendo.all.js:26866
_drop @ kendo.all.js:26882
(anonymous) @ kendo.all.js:27138
_withDropTarget @ kendo.all.js:27191
_end @ kendo.all.js:27136
d @ jquery-1.12.4.min.js:2
trigger @ kendo.all.js:164
notify @ kendo.all.js:26312
_trigger @ kendo.all.js:26185
end @ kendo.all.js:26142
_eachTouch @ kendo.all.js:26422
_end @ kendo.all.js:26382
arguments.length.arguments.<computed>.indexOf.t.<computed>.t.<computed>.options.t.<computed> @ kendo.all.js:2875
dispatch @ jquery-1.12.4.min.js:3
r.handle @ jquery-1.12.4.min.js:3
Show 170 more frames

0
Geetha
Top achievements
Rank 1
Veteran
answered on 08 Oct 2020, 10:04 AM
Hello Tsvetomir, One more problem with Date column grouping, the grid goes on Infinite loop read while grouping from a Date column. Could you please help me to address this issue
0
Tsvetomir
Telerik team
answered on 08 Oct 2020, 05:16 PM

Hi Geetha,

I have tested out the described scenario with a column that is of type DateTime and it appears that the grouping works as expected. Is it possible for you to modify the sample attached to one of my previous responses and replicate the issue there? In order to attach the project, delete the "obj", "bin" and "packages" folders of the project. 

As per the error that is observed with expanding the rows, it is expected due to the fact that each expansion triggers the DataBound event. In turn, the logic of the DataBound expands the next and the unexpected behavior is observed.

It is important to point out that the group paging's main idea is to load the records on demand. If you would like to not load them on demand, switch to the normal grouping functionality.

 

Kind regards,
Tsvetomir
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Geetha
Top achievements
Rank 1
Veteran
answered on 12 Oct 2020, 12:11 PM
Hello Tsvetomir, Below is the sample for the grouping of Datetime column and also please explain me how to achieve the Expandall grouping by defalut
0
Tsvetomir
Telerik team
answered on 13 Oct 2020, 02:21 PM

Hi Pierrick,

I have investigated the sample and there are so many requests sent due to the fact that the dates from the client are sent with the current time zone applied whereas the values on the server-side have no time zone applied. In this case, you should unify the hours section, or keep the dates always in UTC format:

https://docs.telerik.com/aspnet-mvc/html-helpers/data-management/grid/how-to/editing/utc-time-on-both-server-and-client

As per expanding all groups of the grid, you could try the following approach:

<script type="text/javascript">
    function onDataBound(e) {
        var groupsToExpand = e.sender.tbody.find(".k-grouping-row");
            $(groupsToExpand).each(function (ev) {
                var row = this;
                setTimeout(function () {
                    e.sender.expandGroup($(row));
                })
            });
    }
</script>

 

Regards,
Tsvetomir
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive, special prizes, and more, for FREE?! Register now for DevReach 2.0(20).

0
Geetha
Top achievements
Rank 1
Veteran
answered on 22 Oct 2020, 03:27 PM

Hello Tsvetomir, thank you for your help. I updated my application with the new version of the Telerik dll , which was released on 21st.

Can you tell me if the grouping of datatable or list of dynamic ?

Regards,

NAIDU Geetha

0
Geetha
Top achievements
Rank 1
Veteran
answered on 22 Oct 2020, 03:28 PM
Hello Tsvetomir, it is indeed working, thank you
Tags
Grid
Asked by
Pierrick
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Pierrick
Top achievements
Rank 1
Tsvetomir
Telerik team
Geetha
Top achievements
Rank 1
Veteran
Share this question
or