1 Replies - 8453 Views - Last Post: 14 August 2013 - 10:42 AM

#1 Quizton  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 49
  • Joined: 18-April 12

insert & save a key object to db on fly

Posted 29 September 2012 - 11:03 AM

trouble finding a way to insert the resulting text of tbfirstData directly to column and save

if (this.NavigationContext.QueryString.ContainsKey("t1")) 
{ 
    this.tbfirstData.Text = this.NavigationContext.QueryString["t1"]; 
}
  // Any way I can insert the key "t1" to my Column ["FirstData"] and save it on the fly Here?




this is during OnNavTo above but I could implement OnNavFrom to the previous page also

the real issue is a easy way to take that key and insert it to the column then the rest of my

issues will be solved as well thanks

This post has been edited by Quizton: 29 September 2012 - 11:04 AM


Is This A Good Question/Topic? 0
  • +

Replies To: insert & save a key object to db on fly

#2 Quizton  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 49
  • Joined: 18-April 12

Re: insert & save a key object to db on fly

Posted 14 August 2013 - 10:42 AM

Lol. wow this was a good one to re-read.

What I needed back then was just to add

ForceTextBoxDataBindingUpdate();

private void ForceTextBoxDataBindingUpdate()
            {
                object focusObj = System.Windows.Input.FocusManager.GetFocusedElement();

                if (focusObj != null && focusObj is TextBox)
                {
                    var binding = (focusObj as TextBox).GetBindingExpression(TextBox.TextProperty);
                    binding.UpdateSource();
                }
            }


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1