Hello all, I’m looking to store an old value of a textbox field into a UDfield before it’s changed so that when the textbox value changes to a new value, I can have a previous value and current value to play with. Can anyone lead me in the right direction? I am able to comprehend C# code and the different form event wizards. Thank you in advance!
You want a before field change event on the relevant dataview/field. Use the event wizard.
Note that you’ll need to have your variable already declared. In my example below, it would be:
string myValue;
private void Resource_BeforeFieldChange(object sender, DataColumnChangeEventArgs args)
{
// ** Argument Properties and Uses **
// args.Row["FieldName"]
// args.Column, args.ProposedValue, args.Row
// Add Event Handler Code
switch (args.Column.ColumnName)
{
case "AssetNum":
myValue = args.Row["AssetNum"].ToString();
break;
}
}
Also ensure you know what type of data to expect (string,int, etc)
Thank you for the help!
1 Like