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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

grouping grid / lazy loading Businessobject

Thread ID:





71324 Jan 28,2008 08:11 AM UTC Jan 30,2008 08:33 AM UTC WinForms 4
Tags: GridControl
Tobias Bendschneider
Asked On January 28, 2008 08:11 AM UTC


i have nested Businessobjects which load their data on demand.

For example:
My customer - contact object holds a customer object as a property. As soon as I call the "get" method of this property to get the customer object, the customer will be loaded.

Example in code:

Contact y = new Contact()
int number = y.Customer.number // At that point the customer is loaded

And here is my issue: When i bind a lst of customer-contacts to the grouping grid, automatically all customer objects are loaded, even i dont want to bind any property of the customer to that grid.

To prevent the grouping grid to auto-generate the columns of the grid, I write a method, that adds the columns I need to the grid and binds the column to the property of the customer-contact object. I have not bound any grid column to the nested customer object, but when setting the data source property of the grid, each nested customer of the list will be loaded.

I have tested this issue with the windows default data grid. If I do not bind the nested object to a column, the customer object will not be loaded!

Is there any solution for this issue?


Tobias Bendschneider
Replied On January 29, 2008 02:50 PM UTC


here is a sample application wich shows my problem.

Thanks for any help!


haneefm [Syncfusion]
Replied On January 29, 2008 10:53 PM UTC

Hi Tobias,

You can handle the QueryShowField event which affects the auto population of the FiledDescriptorCollections. It is called for each fields and let you control at runtime if a specfic fields should be added to the FiledDescriptorCollections collection. You can set e.Cancel = true to avoid speific fields being added.

this.gridGroupingControl1.Engine.ShowNestedPropertiesFields = false;
this.gridGroupingControl1.Engine.QueryShowField += new Syncfusion.Grouping.QueryShowFieldEventHandler(Engine_QueryShowField);

void Engine_QueryShowField(object sender, Syncfusion.Grouping.QueryShowFieldEventArgs e)
if (e.Field.Name == "ObjCustomer")
e.Cancel = true;

Best regards,

Tobias Bendschneider
Replied On January 30, 2008 07:33 AM UTC

Hey Haneef,

thank u for your help!!

regards Tobias

Fathima Shalini P [Syncfusion]
Replied On January 30, 2008 08:33 AM UTC

Hi Tobias,

Thanks for your update.



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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon