successfull record changed event in GCC

hi,

I am using GCC. when ever a value is changed either in grid or in datasource, i want to raise a custom event which other modules are listening to.

I tried
TableControlCurrentCellAcceptedChanges
but that event is getting fired even if user is entering invalid data (e.g a string in a numeric field). i want that ony when the user has added a valid value, the event should be raised. Also, i want the old value of changed data to be processed.

Thanks in advance

3 Replies

HA haneefm Syncfusion Team April 19, 2007 05:36 PM UTC

Hi Dinesh,

The TableControlCurrentCellAcceptedChanges is fired after the pending changes in the current cell have been transferred to the underlying cell. Is it possible for you to upload us a sample or modify the browser sample to reproduce the issue here? This will help us to analyse the issue further.

//Or

You can check the IsValid property to find a valid cell in a TableControlCurrentCellAcceptedChanges event .Here is a code snippet

private void gridGroupingControl1_TableControlCurrentCellAcceptedChanges(object sender, GridTableControlCancelEventArgs e)
{
if( e.TableControl.CurrentCell.IsValid )
{

}
}

Best regards,
Haneef


DU dinesh upreti April 20, 2007 02:04 PM UTC

Thanks,
it worked.
Another requirement is that i want to get the current record e.g. the way get in query value as e.Record.GetValue
and also the column name.

Thanks


>Hi Dinesh,

The TableControlCurrentCellAcceptedChanges is fired after the pending changes in the current cell have been transferred to the underlying cell. Is it possible for you to upload us a sample or modify the browser sample to reproduce the issue here? This will help us to analyse the issue further.

//Or

You can check the IsValid property to find a valid cell in a TableControlCurrentCellAcceptedChanges event .Here is a code snippet

private void gridGroupingControl1_TableControlCurrentCellAcceptedChanges(object sender, GridTableControlCancelEventArgs e)
{
if( e.TableControl.CurrentCell.IsValid )
{

}
}

Best regards,
Haneef


HA haneefm Syncfusion Team April 20, 2007 09:43 PM UTC

Hi Dinesh,

Please try this code.

private void gridGroupingControl1_TableControlCurrentCellAcceptedChanges(object sender, GridTableControlCancelEventArgs e)
{
Record rec = e.TableControl.Table.CurrentRecord;
int field = e.TableControl.TableDescriptor.ColIndexToField( e.TableControl.CurrentCell.ColIndex);
string ColumnName = e.TableControl.TableDescriptor.Columns[field].Name;
object CellValue = rec.GetValue(ColumnName);
}

Best regards,
Haneef

Loader.
Up arrow icon