0

I have a WinForm with a PivotGridControl bound to a DataTable. There is one field on the datatable that I want to allow the user to update.

I have figured out how to associate an editor with the field. When the user clicks on the cell, the editor appears, the user edits the value, and hits Enter, my EditValueChanged event handler is called and I am able to save value.

but problem comes after value is saved. my function is completed in less than a min but some how process is not completed and my UI is hanged for 50-60 seconds.

I suspect pivot grid do some calculation after editing is done, may updating total/sub total values.

I tried with switching off all type of total but no luck.

My UI become unresponsive after my function for editvalueChanged event is completed.

Can anyone help me to understand why grid is taking that much time and how can I by pass it.

void pivotGridControl_EditValueChanged(object sender, EditValueChangedEventArgs e) {
            PivotDrillDownDataSource ds = e.CreateDrillDownDataSource();
            for (int j = 0; j < ds.RowCount; j++) {
                ds[j][e.DataField] = Convert.ChangeType(e.Editor.EditValue, ds[j][e.DataField].GetType());
            }
        }

I am using Devex v14.1.

Whenever I make change in grid EditValueChanged event fired. So we can say we made change in one cell at a time this event will be fired once and will be ds.rowCount =1.

Also my method completed in less than 1 second. once the method is completed UI is hanged to 50-60 secs. There is no code in my solution which is executing during this 50-60 secs.

I have around 300 MB of data in grid.

Abhash786
  • 881
  • 2
  • 24
  • 53
  • If you say the problem occurs after EditValueChanged, then we need the code which is active after the EditValueChanged. Further it would nice to know how much data your Grid contains. The PivotGrid Methods never need 50-60 second. – Sebi Dec 14 '16 at 10:12
  • Can you tell me which DevExpress version you are using? In 15.2 is no EditValueChangedEvent. Or which editor firing this? – Sebi Dec 14 '16 at 10:27
  • Please check how often the EditValueChanged Event is fired. If you do massive calls with Convert.ChangeType this will slow down performance. – Sebi Dec 14 '16 at 10:36
  • please see updated question – Abhash786 Dec 14 '16 at 11:29
  • Have you checked ds.RowCount by debugging? Also is EditValueChanged function completed at the time your UI delay starts? – jambonick Dec 22 '16 at 09:09
  • Yes.. I verified ds.RowCount, it is 1 and EditValueChanged function completed at the time UI delay starts. – Abhash786 Dec 25 '16 at 04:50

0 Answers0