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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Adding Items to GridComboBoxColumn

Thread ID:

Created:

Updated:

Platform:

Replies:

118829 Apr 13,2015 08:41 PM UTC Apr 22,2015 04:22 AM UTC WPF 7
loading
Tags: SfDataGrid
issam
Asked On April 13, 2015 08:41 PM UTC

Hi,
i have a GridComboBoxColumn with ItemsSource bound to an ObservableCollection .
so to select the foreign key, the user start typing on the GridComboBoxColumn and with autocomplete it give him the corresponding value

but if the entered text don't match any existing value, i want to add a new business object with to GridComboBoxColumn actual text to the observablecollection
 on Column lostfocus or something like that

is it possible to do that please ?

thanks and good day .

Jai Ganesh S [Syncfusion]
Replied On April 15, 2015 03:26 AM UTC

Hi Issam,


Thank you for using Syncfusion products.


We have analyzed your query. You can achieve your requirement by wiring the CurrenCellDropDownChanged event and adding the new entered text in to underlying collection of combobox. We have prepared the sample based on this and please find the sample under the following location,


Sample: http://www.syncfusion.com/downloads/support/directtrac/137592/ComboboxSample-1967864106.zip


Please let us know if you need further assistance.


Thank you,

Jai Ganesh S


issam
Replied On April 16, 2015 03:52 AM UTC

Hi, thanks for the sample .

unfortunally i have some issues with :

if i enter a new value for the ProductName column , a new object is created and added to the underlying collection but with only the 2 first letters !
so if i type "cloud" in the cell a new object is added with the name "cl" .

also the new created object dont become the selected foreign key of the record


any help is welcome


Jai Ganesh S [Syncfusion]
Replied On April 19, 2015 05:54 PM UTC

Hi Issam,

 

We are sorry for the inconvenience caused.

 

We have analyzed your queries and please find the responses for your queries as below,

 

Query 1:

You can achieve your requirement for getting the new entered value in combobox by TextBox LostFocus event and add that value to underlying collection of combobox. We have modified the sample based on this and please find the sample under the following location,

 

Sample: http://www.syncfusion.com/downloads/support/directtrac/137592/ComboboxSample450865298.zip

 

Query 2: (New created object don’t become the selected foreign key of the record)

 

In this case we don’t understand your requirement clearly as "new created object dont become the selected foreign key of the record". Could you please share more information for your query? This would be more helpful for us to provide a better solution.

 

Please let us know if you need further assistance.

 

Thank you,

Jai Ganesh S


issam
Replied On April 20, 2015 04:01 AM UTC

Hi,
http://download1347.mediafire.com/cp9kadzuv0mg/kca4nicf34vxehm/test.swf

as you can see in this video, after typing a new value for the product name column and leaving the cell, the column become empty (no foreign key selected)
however the new object is add to underlying collection of combobox at the bottom but only with first two letters .



thanks for your help


Jai Ganesh S [Syncfusion]
Replied On April 21, 2015 03:02 AM UTC

Hi Issam,


Sorry for the inconvenience caused.


We have analyzed your queries and please find the responses for your queries as below,


Query 1: (After typing a new value for the product name column and leaving the cell, the column

become empty (no foreign key selected)


You can achieve this requirement by setting a Combobox selected item as a newly added item. We have modified the sample based on this and please find the sample under the following location,


Sample: http://www.syncfusion.com/downloads/support/directtrac/137908/ComboboxSample1780241195.zip


Query 2: (New object is add to underlying collection of combobox at the bottom but only with first two letters)


We are unable to reproduce this issue form the last provided sample. Could you please check at your end and please find the video for your reference below,


Video Link: http://www.syncfusion.com/downloads/support/directtrac/137908/ComboIssue-226118823.zip


Please let us know if you need further assistance.


Thank you,

Jai Ganesh S


issam
Replied On April 21, 2015 03:22 PM UTC

hi,

now it's working like a charm .

Many thanks, really appreciate your help !

Saranya CJ [Syncfusion]
Replied On April 22, 2015 04:22 AM UTC

Hi Issam,

Thank you for your update. Please let us know if you require any other assistance.

Regards,
Saranya

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;