Hello,
in my application i have a row-error-status property which can be loaded by a button inside the grid. (The check-process loads a huge amount of data from the database thus it is loaded explicitely by a button click, not implicitely by viewing)
I used a field binding to allow the user to sort/group by that column "rowStatus".
My Problem is that the XamDataGrid loads the data although there is no real reason for doing so - the data is not displayed, there is no sorting set, no filter etc. Nevertheless the grid requests the value of the property which will be a very big bottleneck in the gui causing lots of db-traffic. Thus it is not acceptable.
If i remove the field binding it works but then the user can no more sort for the row error Status.
Can you prevent the grid from loading the data in a state it does not need the data?
Or can you tell me whats the reason the grid is loading the data so i can deactivate this?
I have attached an example which Shows the property value requested.
HI,
Please let me know if you need further assistance regarding this case.
Sincerely,
Matt
Developer Support Engineer
The Property was loaded because you defined it in the XamDataGrid's FieldLayout..
You don't need to show a Property of a class in the XamDataGrid in order to access to that property.
The XamDataGrid has a RecordLoadeMode, which is set to LoadonDemand, by default.
http://help.infragistics.com/NetAdvantage/WPF/2013.1/CLR4.0/?page=InfragisticsWPF4.DataPresenter.v13.1~Infragistics.Windows.DataPresenter.RecordLoadMode.html
Sincerely, Matt Developer Support Engineer
HI Matt,
i was investigating in your example and got an idea for an workaround.
But can we also find the cause why the data grid is loading the property (although the value is not necessarily required) and maybe,
Can i place a feature request / product idea to support lazy load in case a field's value is only referenced in the sorting/grouping/filtering section.
The lazy load pattern says: "only do things that are absolutely necessary at a latest possible Point in time". It turns out to be very robust - your controls will improve Quality Meeting this paradigm!
I am attaching a sample that will load the RowErrorLevel field on a sort or filter change.
Oh sorry, the button to set the activerecord is not relevant for the example.
I Refer to the RowErrorStatus property.
The Checkbox is set to true when the property is loaded. And in the example it is loaded right when i Display the DataRows. That's my Problem. I want the RowErrorStatus property only be loaded when a column is clicked for sorting, when a filter Dropdown is opened or - in my real application - when the button inside the data row is pressed. Just a real lazy load. I do not know why the property is loaded in this example and want to avoid this - but without loosing the capability to sort, filter and group by that column.
The RowErrorStatus property loads huge amounts of data dynamically from the database and i want this loading only to happen if it's really necessarry.
Thanx in advance!