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.

Get record value performance issue

Thread ID:

Created:

Updated:

Platform:

Replies:

115207 Jan 3,2014 04:57 PM Feb 3,2014 06:55 AM Windows Forms 5
loading
Tags: Grouping
Francisco Marquez
Asked On January 3, 2014 04:57 PM

Hi Im using Gridgroupig control version 8, I have a performance issue, I have a loop to get the value  of a column for about 20k records, Im using 2 grids one grid do it fast like a 1min the other takes like 10 min, is there any property in the Grid that could affect the performace of the Getvalue method? how I can retrieve the list of properties set for a Grid?

record.GetValue(column.ColumnName);


Thanks


Anish George [Syncfusion]
Replied On January 9, 2014 07:55 AM

Hi Paco,

 

Thank you for using Syncfusion products.

 

We would like to let you know that for getting a better performance of grid, we can use some Optimization techniques. Below are optimization code.

 

C#:

gridGroupingControl1.CacheRecordValues = false;

gridGroupingControl1.CounterLogic = Syncfusion.Grouping.EngineCounters.FilteredRecords;

gridGroupingControl1.AllowedOptimizations = Syncfusion.Grouping.EngineOptimizations.DisableCounters | Syncfusion.Grouping.EngineOptimizations.VirtualMode | Syncfusion.Grouping.EngineOptimizations.RecordsAsDisplayElements;

gridGroupingControl1.Engine.RaiseSourceListChangedEventsOnEngineOnly = true;

gridGroupingControl1.Table.AllowThreading = true;

gridGroupingControl1.Table.CountersDirty = false;

gridGroupingControl1.Table.RecordsAsDisplayElements = true;

gridGroupingControl1.Table.VirtualMode = true;

gridGroupingControl1.Table.WithoutCounter = true;

gridGroupingControl1.UseOldListChangedHandler = true;

 

We also like to let you know that we have some dashboard samples for better performance of the Grid. You can view the sample from the below location.

 

Location:

<Essential Studio Location>\Syncfusion\EssentialStudio\11.4.0.26\Windows\Grid.Grouping.Windows\Samples\Performance\Engine Optimization Demo\

 

Please let us know if you need any further assistance.

 

Regards,

Anish


Francisco Marquez
Replied On January 14, 2014 12:13 PM

Hi Anish

I tried your suggestions but nothing, the reason that Im looping the grid is because I want to pull out all teh records into a DataTable and then export those records, because Im havinf issues trying to export using the next coode:

Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl converter = new Syncfusion.GroupingGridExcelConverter.GroupingGridExcelConverterControl();

converter.GroupingGridToExcel(this.Grid, book.Worksheets[0], Syncfusion.GridExcelConverter.ConverterOptions.Visible);

Then I get the next message error:

"Unable to cast object of type 'Pdu.Controls.GridGontrol.Engine.PduFilterSection' to type 'Syncfusion.Windows.Forms.Grid.Grouping.GridEmptySection'."

The thing is Im using a custom Engine that has a custom Filtersection, seems the converter have problems to interpretate that, exists a way in which I can still use the ExelConverter with a custom Engine and customfilterBar?

Regards,

Leo



Anish George [Syncfusion]
Replied On January 21, 2014 05:29 AM

Hi Leo,

 

Thank you for your update.

 

We regret to let you know that we are unable to reproduce the scenario in which you are experiencing the issue. It would be helpful for us if you could give us a reproducing sample. We also like t to suggest you to use the QueryCellInfo event instead of for loop so that the time taken will be less. You can get the row and column index in QueryCellInfo event.

 

Please let us know if you need any further assistance.

 

Regards,

Anish


Francisco Marquez
Replied On January 29, 2014 09:02 AM

Hi Anish,

I will try t work in some sample, meanwhile could you please show me how to use the  QueryCellInfo

next is what I have to get the data from the grid ans copy into a new table(I cannot use directly the table from the datasource of the grid as some of the columns are lookup which I think is affecting perrmance).So my doubt is how can simulate to loop the records using the QueryCellInfo , I need to trigger this when the user click in a specific button,


//Create the table schema

foreach (GridColumnDescriptor column in recordSource.GetColumns())

{

if (_availableColumns != null && _availableColumns.ContainsKey(desc.Name) &&

(!_availableColumns[desc.Name].Contains(column.Name)))

continue;

table.Columns.Add(CreateDataColumn(column));     

}

//Loop trought all the records

foreach (Record record in recordSource )

{

DataRow row = table.NewRow();

FillDataRow(row, record);//This method loop trught all the columns to copy the data

table.Rows.Add(row);

}


Thanks,

Leo


Anish George [Syncfusion]
Replied On February 3, 2014 06:55 AM

Hi Leo,

 

Thank you for your update.

 

We regret to let you know that QuerCellInfo cannot be used on a button click because this event will be called continuously when the grid gets loaded. This event will automatically be called for creation each cell of the grid. It would be helpful for us if you could provide us a sample so that we give you an alternative solution for your issue as soon as possible.

 

Please let us know if you need any further assistance.

 

Regards,

Anish


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.

;