Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1445
Numeric Editor and Databind...
posted

On a form I have an UltraGrid. the grid uses a rowEditTemplate. On the row edit template I have a numbericEditor.  To tie the numbericEditor to a particular cell, I am using DataBinds.Add .. Here is my line of code...

this.txtSortOrder.DataBindings.Add("Value",this.rowEditTemplateDepartmentMaster, this._departmentMasterManagementTDS.DepartmentMaster.DepartmentSortColumn.ColumnName);

 

 

 

This works for several other controls. With the numeric editor I enter a number and the (Value Changed Event Fires perfectly). However, when I click ok on the roweditTemplate the ChangedEvent fires again and my value is now null. If I comment the line out I do not get this issue. Again this works with other controls. I do not get what is going on with this control. Any thoughts on how to resolve this error.

Thanks

  • 469350
    Offline posted

    Hi,

    When are you calling this line of code?

    The BindingManager in DotNet can be a little quirky sometimes. I have had experiences where I bound a control before that control's Handle has been created and the BindingManager does not do any binding until after the first time the control becomes visible. So if you are calling this code at a point when the txtSortOrder control has never been visible, it might cause a problem.

    apalcer said:
    However, when I click ok on the roweditTemplate the ChangedEvent fires again and my value is now null.

    I'm not really clear on what you mean by this. Where are you clicking exactly? Some empty space on the RowEditTemplate dialog? And what exactly do you mean by "ChangedEvent". There is no such event that I am aware of - what control are you referring to?