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. Image for the cookie policy date
close icon

Get record value performance issue

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


5 Replies

AG Anish George Syncfusion Team January 9, 2014 12:55 PM UTC

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



FM Francisco Marquez January 14, 2014 05:13 PM UTC

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




AG Anish George Syncfusion Team January 21, 2014 10:29 AM UTC

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



FM Francisco Marquez January 29, 2014 02:02 PM UTC

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



AG Anish George Syncfusion Team February 3, 2014 11:55 AM UTC

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


Loader.
Live Chat Icon For mobile
Up arrow icon