Occurs when the value of an unbound column has been updated.
[Visual Basic]
Public Event UnboundColumnUpdated As UnboundColumnFetchEventHandler
[C#]
public event UnboundColumnFetchEventHandler UnboundColumnUpdated
[Delphi]
public property UnboundColumnUpdated: UnboundColumnFetchEventHandler read remove_UnboundColumnUpdated write add_UnboundColumnUpdated;
Example
If users edit values in an unbound column, the grid does not know what to do with the modified data, since there is no database field in which to store it. In this case, the UnboundColumnUpdated event is raised.
The following code shows a message box when the user edits an unbound column:
Private Sub C1TrueDBGrid1_UnboundColumnUpdated(ByVal sender As Object, ByVal e As C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs) Handles C1TrueDBGrid1.UnboundColumnUpdated
Dim row As Integer = e.Row
If Me.C1TrueDBGrid1.FocusedSplit.Rows(e.Row).RowType = C1.Win.C1TrueDBGrid.RowTypeEnum.DataRow Then
row = Me.C1TrueDBGrid1.RowBookmark(e.Row)
End If
MessageBox.Show("Warning: This column has been updated.")
End Sub
· C#
private void c1TrueDBGrid1_UnboundColumnUpdated(object sender, C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs e)
{
int row = e.Row;
if(this.c1TrueDBGrid1.FocusedSplit.Rows[e.Row].RowType == C1.Win.C1TrueDBGrid.RowTypeEnum.DataRow)
{
row = this.c1TrueDBGrid1.RowBookmark(e.Row);
}
MessageBox.Show("Warning: This column has been updated.");
}
· Delphi
procedure C1TrueDBGrid1_UnboundColumnUpdated(sender: System.Object; e: C1.Win.C1TrueDBGrid.UnboundColumnFetchEventArgs);
var
row : Integer;
begin
row := e.Row;
if (Self.C1TrueDBGrid1.FocusedSplit.Rows[e.Row].RowType = C1.Win.C1TrueDBGrid.RowTypeEnum.DataRow) then
row := Self.C1TrueDBGrid1.RowBookmark(e.Row);
MessageBox.Show('Warning: This column has been updated.');
end;
See Also
C1TrueDBGrid Class | C1TrueDBGrid Members | C1.Win.C1TrueDBGrid Namespace
Send comments about this topic to ComponentOne. Copyright © ComponentOne LLC. All rights reserved. |