DataTable howto Refresh Controls


  • I have a Datatable (  typed dataset) on which I implemented some code to change other columns based on the contents of some columns currently entered.

    The events get fired and everythings works ok and my other columns get also changed as wished.

    The only problem : the controls on the forms does not get changed for the changed columns....

    I have also tried "ColumnChanging" but same problem.

    what am I missing ?

    public partial class MyRelDataSet { partial class APP_BuyBook_OrderDataTable { bool SilenceMode = false; public override void EndInit() { base.EndInit(); this.ColumnChanged += new DataColumnChangeEventHandler(OnColumnChanged); } protected void OnColumnChanged(object sender, DataColumnChangeEventArgs e) { switch (e.Column.ColumnName) { case "LeadTime": { DateTime DateCom = DateTime.Parse(e.Row["DateOrder"].ToString()); DateTime DateReq = DateTime.Parse(e.Row["DateRequise"].ToString()); if (DateReq.Date != DateCom.AddDays(Convert.ToInt16(e.ProposedValue.ToString())).Date) { SilenceMode = true; // e.Row["DateRequise"] e.Row.SetField("DateRequise", DateCom.AddDays(Convert.ToInt16(e.ProposedValue.ToString())).Date); SilenceMode = false; <---- here I want to see the TextBox on my forms reflecting the change made on the column "DateRequise"

    } break; }

    • Edited by Valérie r Wednesday, July 09, 2014 6:16 PM
    Wednesday, July 09, 2014 6:08 PM


All replies