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

code optimisation

Thread ID:




60046 Apr 26,2007 05:01 PM UTC WinForms 0
Tags: GridControl
dinesh upreti
Asked On April 26, 2007 05:01 PM UTC


My application require the following piece of code to be executed to acheive the desired functionality.
The average value for dgRangePlanGrid.TableDescriptor.Columns.Count is 300 and its taking around 8 seconds to execute this code..
Can you help me in optimising this code.
One more thing is that in my out put window, when i debug the application, i get the following message.

"Could not find Field with name in EntityCollectionView`1 for column Column 1". Can that be the reason for the long time taken. If yes, waht can be the resolution.

for (int i = 0; i < dgRangePlanGrid.TableDescriptor.Columns.Count; i++)
viewColumnName = dgRangePlanGrid.TableDescriptor.Columns[i].Name;

if (!dgRangePlanGrid.TableDescriptor.VisibleColumns.Contains(viewColumnName))

if (viewColumnName == "StatusCancelled")
dgRangePlanGrid.TableDescriptor.Columns[viewColumnName].Width = 50;
dgRangePlanGrid.TableDescriptor.Relations[Constants.SUPPLIERFACTORY_RELATION].ChildTableDescriptor.Columns[viewColumnName].Width = 50;
dgRangePlanGrid.TableDescriptor.Columns[viewColumnName].Width = 0;
dgRangePlanGrid.TableDescriptor.Relations[Constants.SUPPLIERFACTORY_RELATION].ChildTableDescriptor.Columns[viewColumnName].Width = 0;


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

This page will automatically be redirected to the 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