1
Answer

Binding Issue

bogart.vargas

bogart.vargas

20y
2.6k
1
Hello everyone, My problems is this. On form 1 I have a grid with user information. When a select row is selected I give them the option to update thier information. On the 2nd forms I have this code.... this.chkDefault.DataBindings.Add("Checked", this.user.Data, "Xref.DefaultFlag"); The problem is that the chk box is not correct, it defaults to the first row checked valued and not the selected row. Does someone have an idea of how to solve this issue?
Answers (1)
0
Vulpes

Vulpes

NA 98.3k 1.5m 12y
I've modeled what you've described and come up with this which works fine (.NET 4.0) :

using System;
using System.Threading.Tasks;

class Test
{
   static void Main()
   {
      int result = FuncA(11);
      Console.WriteLine(result); // 17
      Console.ReadKey();
   }

   static int FuncA(int i)
   {
      i++;
      Task<int> task = Task.Factory.StartNew<int>(() => FuncB(i));
      int j = task.Result;
      return j + 3;
   }

   static int FuncB(int i)
   {
      return i + 2; 
   }
}

So, what else are you wanting to do?

Are you just wanting to do it in a different way so it will run on .NET 3.5 say?