Databind Problems : When IS Begin Edit Called?

  • Thread starter Thread starter Marauderz
  • Start date Start date
M

Marauderz

Can someone please tell me exactly WHEN is BeginEdit called by Databinding?

Is it only called when the values are changed in the UI? IE, bound textbox
lost focus, listbox selected index changed? what if only the property of the
IEditableObject is changed? will BeginEdit be called on the object
implementing IEditableObject? Or do I have to call it myself manually?

Thanks.
 
Hi,

Marauderz said:
Can someone please tell me exactly WHEN is BeginEdit called by Databinding?

Is it only called when the values are changed in the UI?

I suppose so.

IE, bound textbox
lost focus, listbox selected index changed? what if only the property of the
IEditableObject is changed? will BeginEdit be called on the object
implementing IEditableObject? Or do I have to call it myself manually?

Manually.
 
Thanks for the help!

Say.. additional question, if I'm writing a Databound control that binds to
a DataTable. What do I set so that the form's

me.bindingcontext(DataTAble).current will return the current selected row in
my control?
 
Hi,

It depends on the code used for binding.
Example:
If this code is used
textBox1.DataBindings.Add("Text", dataTable1, string.Empty)

Then you'll get BindingManagerBase by calling BindingContext(dataTable1).

If you also used dataMember parameter, then you should pass it to
BindingContext.
 
Back
Top