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.
Unfortunately, activation email could not send to your email. Please try again.

Can GridDataBoundGrid paint only visible area?

Thread ID:

Created:

Updated:

Platform:

Replies:

67473 Aug 20,2007 04:59 AM Aug 21,2007 08:22 AM Windows Forms 3
loading
Tags: GridControl
Rahul Srivastava
Asked On August 20, 2007 04:59 AM

Hi,

I have a GridDataBoundGrid and it is bound to a dataset. I am showing parent child relation as in the dataset in the grid(grouping).

the dataset i get from datasource at every some time interval say 1 sec. and i am rebinding the new dataset with the grid.

the things are working fine, but as the data increases, CPU utilization of the process increases.

can u please let me know the possible solutions for this?

can i instruct GridDataBoundGrid to paint only the visible area?

Please let me know at the earliest.

Thanks and Regards,

Rahul Srivastava

Golda Rebecal [Syncfusion]
Replied On August 21, 2007 01:40 AM

Hi Rahul,

Please refer to the following KB article that shows how to efficiently directly modify the underlying DataSource when it is bound to the DataBoundGrid.

http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=99

Kindly let me know if this helps you.

Best regards,
Golda

Rahul Srivastava
Replied On August 21, 2007 05:44 AM

Hi,
I am already doing as suggested in the link you provided.

here is the sample code of what i am doing.

grdData.Binder.ResetHierarchyLevels();

int vpos = this.grdData.GetCurrentVScrollPixelPos();
int hpos = this.grdData.GetCurrentHScrollPixelPos();

grdData.FreezePainting = true;

grdData.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.HideAlways;
grdData.BeginUpdate();
grdData.Binder.SuspendBinding();

grdData.DataMember = "BasketTable";
grdData.DataSource = dsParentChild;
grdData.Binder.EnableAddNew = false;

GridHierarchyLevel rootlevel = grdData.Binder.RootHierarchyLevel;

for(int i = 1;i < Common.NumberOfColumns;i++)
{
// Setting the header texts grdData.Binder.InternalColumns[i-1].HeaderText = Common.GetColumnHeaderText(i);
}

grdData.Binder.ResumeBinding();
grdData.EndUpdate();

this.grdData.SetCurrentHScrollPixelPos(hpos);
this.grdData.SetCurrentVScrollPixelPos(vpos);

grdData.ShowCurrentCellBorderBehavior = GridShowCurrentCellBorder.AlwaysVisible;
grdData.FreezePainting = false;


the above code is working fine, but with huge amount of data, CPU Utilization is very high.

Please let me know any reason for it.


Golda Rebecal [Syncfusion]
Replied On August 21, 2007 08:22 AM

Hi Rahul,

We always recommend the developers to use GridGroupingControl to bind with large datasource and for higher performances, especially hierarchical datasources. The GridDataBoundGrid will be obsolete much sooner and no performance enhancement will be done in our future releases.

GridGroupingControl has lot of additional features when compared to GridDataBoundGrid. For more information on GridGroupingControl, you can refer to our browser samples for GridGroupingControl, that has been shipped with our product.
You can access those samples from the following location.
C:\Program Files\Syncfusion\Essential Studio\5.1.0.51\windows\Grid.Grouping.Windows\Samples

Kindly let me know if you need any further assistance.

Best regards,
Golda

CONFIRMATION

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.

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.

;