get accessor of the enumerable field within a field layout being called without expanding

Not Answered This post has 0 verified answers | 3 Replies | 2 Followers Thread's RSS feed.

Saratchandra
Points 60
Replied On: Wed, Oct 11 2017 7:06 AM Reply

Hi,

I have a XamDataGrid field layout with two IEnumerable fields within it. with in the get accessor of both the enumerable fields, I make a external call to populate the data for each and return back.

The behavior for this setup used to be like this: the parent row shows a expander, and when expanded the get accessor gets called and retrieves the rows to show for both the enumerable fields.

We have this setup from long time and is working fine as above. But recently, for some users the get accessor is getting called before even expanding, which is not the case for me when I debug locally. So, the same code is behaving differently for different users. When I compared the dlls that are loaded in mine with theirs, I see these two additional in mine: PresentationFramework-SystemCore.dll, System.ComponentModel.DataAnnotations.dll

Do they have anything to do with this behavior?

Why do I see different behavior for different users?

Also, theoretically I expected get accessor of enumberable to be called when loading parent field layout without expanding, but that was not the case how its happening (is it some optimization in infragistics?)

Our parent field layout itself is an enumerable list of model items, so as the external calls are happening for all the rows at once, UI crashes due to OOM. This was never the case before.

Any alternative approaches that I can take so that I can trigger the external call only when expanded, and prevent the list being populated all beforehand?

Application is using Infragistics 16.1 and is targeted towards .net framework 4.0. However, .4.6.1 is installed on the users' machines. I suppose there is backwards compatibility, so this shouldn't be a issue, right?

Thanks.

  • Post Points: 20

All Replies

Stefan
Points 138,143
Infragistics Employee
Replied On: Wed, Oct 11 2017 9:19 AM Reply

Hello Saratchandra,

Thank you for your post. I have been looking into it and I can say that get accessor of the child collection is called when the record is expanded due to performance optimizations. As for the dlls you mention (PresentationFramework-SystemCore.dll, System.ComponentModel.DataAnnotations.dll) I don't think they are the reason for the different behavior. If you can send as an isolated sample where the behavior is reproducible we will be able assist you with this further.

Looking forward for your reply.

Sincerely,
Stefan, MCPD
Software Developer
Infragistics, Inc.
www.infragistics.com/support

  • Post Points: 20
Saratchandra
Points 60
Replied On: Thu, Oct 12 2017 12:12 PM Reply

Thanks for the reply Stefan.

As its happening for some set of users, I am still trying to create a reproducible example.

Meanwhile, can you let me know alternate approaches to resolve the issue. Can I listen on expanded event on the child enumerable object within field layout and then populate the collection?

Thanks,

Saratchandra

  • Post Points: 20
Stefan
Points 138,143
Infragistics Employee
Replied On: Fri, Oct 13 2017 3:32 AM Reply

Hello Saratchandra,

I can suggest you capture the stacktrace from the getter, so we could be able to see what is calling it. You can log the Environment.StackTrace and send us the log from your customers machines.

Looking forward for your reply.

Sincerely,
Stefan, MCPD
Software Developer
Infragistics, Inc.
www.infragistics.com/support

  • Post Points: 5
Page 1 of 1 (4 items) | RSS