@Mark Wiegold , Based on your description, you want to update the datatable when the textbox's property ToolTip is changed.
I used the following code to do it successfully, but I didn't use MVVM to do it.
public partial class MainWindow : Window
{
DataTable table = new DataTable();
public MainWindow()
{
InitializeComponent();
table.Columns.Add("FirstName");
table.Columns.Add("Address");
table.Columns.Add("Description");
table.Rows.Add("test1", "Home", "d1");
table.Rows.Add("test2", "Company", "d2");
table.Rows.Add("test3", "Home", "d3");
table.Rows.Add("test4", "Home", "d4");
Binding bindMyColumn = new Binding();
bindMyColumn.Source = table;
bindMyColumn.Path = new PropertyPath("Rows[2][0]");
bindMyColumn.Mode = BindingMode.TwoWay;
DiameterLowerRoll1.SetBinding(TextBox.ToolTipProperty, bindMyColumn);
}
private void btntest_Click(object sender, RoutedEventArgs e)
{
DiameterLowerRoll1.ToolTip = "test3333";
}
}
Result:
Hope mu solution could help you.
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.