This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi Jason, I have a datagrid that uses TextBox as the EditorTemplate for a column. If we set data binding's UpdateSourceTrigger = UpdateSourceTrigger.LostFocus and set column.IsAlwaysInEditMode = true (for some other reason, I need it to be always in edit mode) then it will not update the data source after the cell lost focus (by clicking on other cell or other control). The following are sample code:
I checked TextBox's LostFocus event and at this moment, the Text property is empty. Please advise what should I do! Thanks, Gordon |
|
|
Hi Gordon, Thanks for pointing this out. A possible fix for this will be available in the next nightly build. Let me know how it goes. Note that IsAlwaysInEditMode was a fairly experimental feature and if possible, may be best to avoid. I'll support it as best I can in cases that you really need to use it though. -Jason Fauchelle |
|
|
Hi Jason, I downloaded the mar. 3, 2016 nightly build, and the problem is not fixed. For some other reason, I do need it always in edit mode, i.e. in the image attached, I have a custom control contains a TextBox, and a button. I want to put this control into datagrid, so the user can click on the button to browse for a file. If this column is not always in edit mode, then once the browsing file dialog is shown, the column is back to display mode. So the file we got cannot be set back to the textBox, since this custom control got unloaded already. So we cannot update back to the data source. Thanks, Gordon |
|
|
Hi Gordon, I have not been able to reproduce this issue with my fix in place. I'll have another go next week. If you can send me a repro project, or example code similar to your custom control, then that would be a huge help to solving this. -Jason Fauchelle |
|
|
HI Jason, The included is the reproducing project with textbox always in editor mode. It can reproduce the problem. It takes more time to have my custom control to put in the project
If you really need to have my custom control in I can when I got some time. Thanks, Gordon |
|
|
Hi Gordon, Thanks for the repro project. If I'm able to reproduce the issue with this, then I shouldn't need the custom control code - I had originally thought the existence of a custom control may be causing the issue. I will let you know how it goes. -Jason Fauchelle |
|
|
Hi Gordon, Thanks again for the repro project. I was able to reproduce the issue and have made fix to be available in the next nightly build. -Jason Fauchelle |
|
|
Hi Jason, The problem is fixed. Thanks, Gordon |
|