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.

Dupilcation of the record in the gridGropuing Control

Thread ID:





34372 Sep 8,2005 06:56 AM Sep 13,2005 06:03 PM Windows Forms 9
Tags: GridControl
prathima venkobachar
Asked On September 8, 2005 06:56 AM

Hi, I am using gridGroupingControl. I have a requirenment of doing update row by row and batch update. To do row by row update I am using this.gridGroupingControl.SourceListListChanged +=new TableListChangedEventHandler(ggdAssetView_ListChangedEventHandler); event. To do batch update I have update button. I am facing a typical error.When I do continuous realtime update lets say 6-7 rows and then uncheck real time checkbox and try to update continuosly 5-6 rows(any column) and then click on update button, by this time the id would have duplicated. I am attaching the sample code I am using.Pl run the main project.I am also attaching the snapshot of the error. PerformanceTestProj_681.zip Thanks, Prathima Error_8319.zip

prathima venkobachar
Replied On September 8, 2005 06:59 AM

Sorry wrong snapshot I had attached DuplicateError_393.zip

Administrator [Syncfusion]
Replied On September 8, 2005 07:00 PM

Here is your form1 file back. http://www.syncfusion.com/Support/user/uploads/Form1_be175dfe.zip The code has been tweaked a little with some comments in the viewGridControl1_RefreshView method.

prathima venkobachar
Replied On September 9, 2005 01:28 AM

Great, awesome !!! The code is perfectly working. But there is a huge performance issue. I agree I am calling AcceptChanges() so the code is slow. Is there any way to improve ..? I am using version.I cant use 3.3 version. Thanks, Prathima

prathima venkobachar
Replied On September 9, 2005 03:48 AM

One more question : You are storing Current record before acceptChanges and resetting Currentrecord after acceptChanges(). why is this required..? Record r = this.groupingGrid.SyncfusionGridControl.Table.CurrentRecord; this.dataTable.AcceptChanges(); this.groupingGrid.SyncfusionGridControl.Table.CurrentRecord = r; Thanks, Prathima

Administrator [Syncfusion]
Replied On September 9, 2005 09:30 AM

Calling dataTable.AcceptChanges raises a ListChanged.Reset event on the DataView associated with the datatable. This caused the grid to lose the current record. That code persists the current record across teh AcceptChanges call. This reset event is why the AcceptChanges call is so costly. Is there a business reason that you require the datatable.AcceptChanges call in this situtaion? The changes are pushed to the datatable and the ListChanged.ItemChanged event is raised as you change records in the grid without this call to datatable.AcceptChanges.

prathima venkobachar
Replied On September 12, 2005 05:27 AM

Hi, Thanks, for the information.It is a business requirenment. I am having a problem with cursor.When I move it to the next row, if I enter any character in the cell, it adds it to the existing value..where as it should be entered as a new value..how can we solve this. Thanks, Prathima

Administrator [Syncfusion]
Replied On September 12, 2005 06:43 PM

Try setting grid.ActivateCurrentCellBehavior = GridCellActivateAction.DblClickOnCell; to see if this gives you the behavior you want.

prathima venkobachar
Replied On September 13, 2005 02:49 AM

Hi, This doesn''t solve the problem. You can replicate the probelm in the sample attached before. I feel it is not ending the edit. When we move from one row to other..If we enter any value it appends to the cell value..and the cursor position will be in the left of the text..if its in the right..this solves the problem. You can have a look at the problem in the sample..just traverse from one row to other and try to enter the value.. Thanks, Prathima

Administrator [Syncfusion]
Replied On September 13, 2005 06:03 PM

If you set this property like this, you can avoid the problem. this.viewGridControl1.GroupingGrid.SyncfusionGridControl.TableModel.Options.ActivateCurrentCellBehavior = GridCellActivateAction.None;


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.