We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

SfTextBoxExt in SfDataGrid Template column

Hi!

I have a SfTextBoxExt in TemplateColumn in SfDataGrid in EditTemplate.

Editing and bindings works, but when editing for specific cell is finished, binding is set to null (I assume because SfTextBoxExt control gets destroyed). How can I fix this?

The second problem I'm experiencing is that if I have two different objects with the same property that is used for searching, the first object is always chosen (even if I selected the other one with a mouse click or keyboard enter from the dropdown menu). There are two "Jack Longtoes" names in the dropdown but with different email (sample app bellow). No matter which name I choose from the dropdown, the first one is always selected (current item is displayed in the bottom red box as a debug view).

I've attached a sample program to demonstrate both problems.

Thank you for your help and kind regards,

Karmen Gostiša

Attachment: WpfApplication1_53889210.zip

3 Replies

KJ Keerthana Jegannathan Syncfusion Team October 20, 2016 01:07 PM UTC

Hi Karmen, 
 
Thank you for contacting Syncfusion support. 
 
Query 1: Editing and bindings works, but when editing for specific cell is finished, binding is set to null (I assume because SfTextBoxExt control gets destroyed). How can I fix this? 
 
We have checked your previously updated sample and found that you had using “OnSelectionChanged” event. This event raises only when the items in AutoComplete is selected. So we request you use “TextChanged” event to update the binding while editing. Also if you need to update the changes in lost focus, you can update in LostFocus event. We have prepared sample for your reference and it can be downloaded from the below location. 
 
Query 2: The second problem I'm experiencing is that if I have two different objects with the same property that is used for searching, the first object is always chosen (even if I selected the other one with a mouse click or keyboard enter from the dropdown menu). There are two "Jack Longtoes" names in the dropdown but with different email (sample app below). No matter which name I choose from the dropdown, the first one is always selected (current item is displayed in the bottom red box as a debug view). 
 
We have checked your sample, in this to update the selection in SfTextBox, we request you to include “UpdateSourceTrigger”. We have included this changes in below sample and it can be downloaded from the below location. 
 
Sample: SfTextBoxExt 
 
Please let us know whether it is helpful. 
 
Regards, 
Keerthana J. 



KA Karmen October 20, 2016 07:12 PM UTC

Thank you for your reply.

LostFocus event will come in handy but I'm still experiencing the second problem - when there are two objects of type Person with the same name but different e-mail, the first one is selected. 

In the sample below there are two "Jack Longtoes" with different e-mail (the first one is "jack.longtoes@bottoms.up" and the other one is "theothermail@bottoms.up"). If I run the program in debug mode, start typing "Ja" in the SfTextBoxExt, choose "theothermail@bottoms.up" from the autocomplete dropdown and then check the SelectedPerson value, the selected value will not be the Jack Longtoes with "theothermail@bottoms.up" but the first one. 

Thank you in advance for your help,

Karmen Gostiša

Attachment: SfTextBoxExt826906239_788643b4.zip


VI Vinothini Syncfusion Team October 21, 2016 07:10 AM UTC

Hi Karmen,  
 
Thank you for your update.  
 
We were able to reproduce the issue on our side and we have consider it as an issue. A support incident has been created to track the status of this issue under your account. Please log on to our support website to check for further updates.  
 
 
Regards,  
Vinothini.R    


Loader.
Live Chat Icon For mobile
Up arrow icon