here is the code
public void Update(TravTasks.TravellerTask data)
{
//UNDONE: this algorithm sucks
TreeIter iter;
if (this.tasks_tree_store.GetIterFirst(out iter))
{
string task_id = this.tasks_tree_store.GetValue(iter, 1).ToString();
if (task_id.Equals(data.ID.ToString()))
{
this.tasks_tree_store.SetValue(iter, 0, data.TaskName);
this.treeview3.ShowAll();
return;
}
while (this.tasks_tree_store.IterNext(ref iter))
{
task_id = this.tasks_tree_store.GetValue(iter, 1).ToString();
if (task_id.Equals(data.ID.ToString()))
{
this.tasks_tree_store.SetValue(iter, 0, data.TaskName);
return;
}
}
}
}