when i tried to create a record, field values are empty in RecordAdded event.
{
e.Record.Cells["FieldName1"].Value.ToString()
}
is this the correct way to retrieve the values???
or i am doing something wrong.
if there is any example for adding new records please direct me.
thanks
Here is some code that you can use to determine if the Record passed into the RecordUpdated event is a record that was just added. Note: This approach of using the Tag property of the Record will only work in the latest hotfix since the Tag property was just added. If you are using an older version you could simply save a reference to the newly added record in RecordAdded and then check that reference in RecordUpdated.
void xamDataGrid1_RecordUpdated(object sender, Infragistics.Windows.DataPresenter.Events.RecordUpdatedEventArgs e)
if (e.Record.Tag is string && (string)e.Record.Tag == "IsAddRecord") {
if (e.Record.Tag is string && (string)e.Record.Tag == "IsAddRecord")
// Do what you need to do e.Record.Tag = null;
// Do what you need to do
e.Record.Tag = null;
void xamDataGrid1_RecordAdded(object sender, Infragistics.Windows.DataPresenter.Events.RecordAddedEventArgs e)
if (e.Record.IsAddRecord) e.Record.Tag = "IsAddRecord";
if (e.Record.IsAddRecord)
e.Record.Tag = "IsAddRecord";
Joe
RecordAdded is only to make sure, if the addind started or not?
I am thinking RecordUpdate is only to update the existing records.
so, if i have to create a new record....
I have to use the RecordUpdated method?? in this case, how do i know, if its a new record or the old record is being update?
if possible could you please drop few lines of code or guide me where i can look at the code related to adding new record...its confusing