Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SfComboBox in User Control Property value not passed #38

Open
SunshineSpring666 opened this issue Mar 10, 2021 · 8 comments
Open

SfComboBox in User Control Property value not passed #38

SunshineSpring666 opened this issue Mar 10, 2021 · 8 comments

Comments

@SunshineSpring666
Copy link

Hi,
In some cases we need to put SfComboBox inside custom control for reusability. Some Properties are defined as BindableProperty to pass values in and out of the custom control.
The SelectedItem of SfComboBox don't get passed as expected in below demo project, weird. Please take a look at it.
Thanks a lot.

SfComboBoxCustomControl.zip

@Sakthivel-sync
Copy link

Hi @SunshineSpring666 ,

SelectedItem is a BindableProperty but the type is Object, So you can get and set the SelectedItem value directly. Could you please explain more details about what type of issue you have been faced.

Regards,
Sakthivel P.

@SunshineSpring666
Copy link
Author

When putting the SfComboBox inside a custom control, the bound value of SelectedItem don't get passed out of the custom control as expected in the rendered Page.
Please see the above attachment link. It's a demo project to show the issue. 
Thanks.

@Suganyasheela
Copy link

Hi @SunshineSpring666,

We can get the SelectedItem of SfComboBox in your application. Please have the screenshot for your reference.

ScreenShot

Since we were not aware for your exact scenario. Could you please share the following information.

  1. In which platform issue was reproduced. Please provide device information if you are using an Android device.
  2. Could you please share the replication steps for the issue or issue reproducing video.

This will allow us to investigate further and provide a better solution as soon as possible.

Regards,
Suganya Sethuraman.

@Suganyasheela
Copy link

Please have the screenshot

SelectedItemImage

@SunshineSpring666
Copy link
Author

Hi team,
The selected item is expected to get rendered in the green square below. The selected Customer needed to be passed through the Custom Control to the item in the list. Can't figure out what's wrong here.

Code Screenshot

Demo Screenshot

Thanks

@AnandRaj32
Copy link

Hi @SunshineSpring666

We suspect that the binding was not proper, and we would suggest changing the binding to a text as per the below code snippet:

<uc:CustomerCard x:Name="customerCard" Customers="{Binding CustomerCandidates, Source={x:Reference this}}" InEdit="{Binding InEdit, Source={x:Reference this}}"/>
<!-- After selecting customer from the custom user control, the Cust doesn't get it's value assigned as expected-->
<Label Text="Selected:" TextColor="Red"/>
<Label Text="{Binding Source={x:Reference customerCard}, Path=Customer.Abbr}"/>
<Label Text="{Binding Source={x:Reference customerCard}, Path=Customer.Company}"/>

Regards,
Anand Raj S.

@SunshineSpring666
Copy link
Author

Hi Team,
Sorry, I didn't state it clearly. My problem is:
I need to make the value actually assigned to the ObservableCollection of OrderQueue when the item in SfComboBox is selected inside the custom control.
In other words, the selected customer from CustomerCard doesn't get assigned to the OrderQueue outside the custom control.
Thanks a lot.

@Sakthivel-sync
Copy link

We would like to discuss more about your issue, so please share your details to [email protected] mail id, which will be helpful for us to proceed further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants