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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

GridGroupingControl - QueryCellStyleInfo no longer works after edit

Thread ID:

Created:

Updated:

Platform:

Replies:

48031 Aug 17,2006 04:36 PM UTC Aug 18,2006 09:43 AM UTC WinForms 1
loading
Tags: GridControl
Clive Hill
Asked On August 17, 2006 04:36 PM UTC

Hi,

My GGC updates correctly from an external feed until I edit one of the cells. When I edit a cell it feeds back to servers, which then return with new values that are bound to the DataTable. After editing, the rows only update on the screen if I go to that row using arrow keys. They then refresh and show correct values.

(The underlying DataTable does update correctly. Also, if I do dt.AcceptChanges() the screen updates, but this causes massive performance issues, so I want to avoid doing this.)

I''ve tried calling cc.EndEdit(), cc.ConfirmChanges() but these don''t do the trick. I haven''t set any of the options in GGC.TableOptions.

Any ideas why the query cell style info stops refreshing after editing a cell?


Here is code for TableControlCurrentCellEditingComplete handler:


GridGroupingControl dataGrid = sender as GridGroupingControl;
GridCurrentCell cc = e.TableControl.CurrentCell;
GridTextBoxCellRenderer gcrb = cc.Renderer as GridTextBoxCellRenderer;
GridTableCellStyleInfoIdentity style = dataGrid.TableModel[cc.RowIndex,cc.ColIndex].TableCellIdentity;
if(style.TableCellType == GridTableCellType.RecordFieldCell || style.TableCellType == GridTableCellType.AlternateRecordFieldCell)
{
string mappingName = style.Column.Name;
if(!(mappingName == "Arg1" || mappingName == "Arg2" || mappingName == "Arg3" ))
{
return;
}
double updatedText = double.Parse((string)style.DisplayElement.ParentRecord.GetValue(mappingName));
string staticTenor = (string)style.DisplayElement.ParentRecord.GetValue("StaticTenor");
IDictionaryEnumerator ienum = RecordCollection.GetEnumerator();
ienum.Reset();
while (ienum.MoveNext())
{
CustomRecord cr = ienum.Entry.Value as CustomRecord;
if (cr.CompleteName.IndexOf("."+staticTenor) > -1)
{
TransactionParam tp = new TransactionParam();
tp.FieldName = mappingName;
//Map the selectedItem onto corresponding int value
tp.ParamValue = updatedText;
TransactionParam[] params_ = {tp};
// Should put in exception checking
transact(params_, cr);
break;
}
}
}
// Last thing to do is reject changes so goes to old value, and is ready to get update from processUpdate
cc.RejectChanges();
cc.ResetCurrentCellWithoutDeactivate();

}

Administrator [Syncfusion]
Replied On August 18, 2006 09:43 AM UTC

Hi Vito,

Try calling the Table.EndEdit() method followed by the CurrentCell.EndEdit() method. Here is a code snippet.

e.TableControl.CurrentCell.EndEdit();
e.TableControl.Table.EndEdit();

Let me know if this helps.
Regards,
Haneef

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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

Warning Icon 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.Close Icon

;