GridPickerColumn Not working in 16.x

Hi. 

I use in a project your component datagrid with a gridColumnPicker. 
In version 15.4.0.x all is working. 

If I use 16.xxx the gridColumnPicker doesnt work. When I click on the cell the picker is not displayed. 


VIEW : 

 <syncfusion:SfDataGrid x:Name="dataGrid" 
                                   AllowSorting="True"
                                   AllowResizingColumn="True"
                                   AutoGenerateColumns="False"
                                   AllowSwiping="True"
                                   ColumnSizer="Star"
                                   EditorSelectionBehavior="SelectAll"
                                   EditTapAction="OnTap"
                                   FrozenColumnsCount="1"
                                   Grid.Row="1" 
                                   Grid.Column="0" 
                                   GridLoaded="dataGrid_GridLoaded"
                                   ItemsSource="{Binding Lignes, Mode=TwoWay}"
                                   SwipeEnded="dataGrid_SwipeEnded"
                                   >
                    <syncfusion:SfDataGrid.Columns  x:TypeArguments="syncfusion:Columns">
                        <syncfusion:GridPickerColumn 
                                   AllowEditing="True"   IsHidden="False"
                                   ItemsSource="{Binding Source={x:Reference rootElement},Path=BindingContext.ListUnites}"
                         DisplayMemberPath="Libelle"
                                    ValueMemberPath="Code"
                                   HeaderText="Unites"
                                   MappingName="Unit" />
                    </syncfusion:SfDataGrid.Columns>
                    <syncfusion:SfDataGrid.RightSwipeTemplate>
                    </syncfusion:SfDataGrid.RightSwipeTemplate>
            </syncfusion:SfDataGrid>



VIEW MODEL

 private IList<PickerModel> _listUnites;
        public IList<PickerModel> ListUnites
        {
            get
            {
                if (_listUnites == null)
                {
                    loadUnites();
                }
                return _listUnites;
            }
            set
            {
                _listUnites = value;
            }
        }


I put the VS trace when I click on gridCell.

I need to work with version 16;x because I use  your ListView component which doesnt work with version 15.x

Thanks for your help.




Attachment: gridNotWorking16_6e7453d9.zip

14 Replies

SK Suriya Kalidoss Syncfusion Team March 8, 2018 05:23 PM UTC

Hi Dawid, 
 
Thank you for using Syncfusion Products 
 
    We have analyzed your query. We does not find issue from our side. Picker Column is working fine. We have attached the working sample for your reference. If your requirement deviates from us please modify your requirement in our sample so it be will easy to find the quick solution. 
 
 
Regards, 
Suriya K 
 



DE DEV March 9, 2018 04:54 PM UTC

Hi. 

Thanks for your response

Your example works actually, but is 'quite' simple. 
I have a mvvm architecture with IOC, so i can't have a 'view model' with a parameterless constructor. 
So the syntax : 
    <ContentPage.BindingContext>
        <local:OrderInfoRepository x:Name="viewModel"/>
    </ContentPage.BindingContext>

is not usefull.



My viewmodel constructor is :

public SaisieViewModel(IApplicationTools applicationTools,
                                IAffectationZoneRepository affectationZoneRepository,
                                IAppSettingRepository appSettingRepository,
                                IArticleService articleService,
                                IChantierService chantierService,
                                IInterimaireService interimaireService,
                                IEventAggregator eventAggregator,
                                IExceptionManager exceptionManager,
                                IFournisseurRepository fournisseurRepository,
                                IIndemniteDeplacementRepository indemniteDeplacementRepository,
                                ILoginService loginService,
                                 IMaterielService materielService,
                                IMaterielIndividuRepository materielIndividuRepository,
                                IMeteoRepository meteoRepository,
                                IModeleService modeleService,
                                INavigationService navigationService,
                                IPageDialogService pageDialogService,
                                IPersonnelService personnelService,
                                IPhaseChantierRepository phaseRepository,
                                IRapportService rapportService,
                                IRubriqueRepository rubriqueRepository,
                                ISocieteRepository societeRepository,
                                IUniteRepository uniteRepository,
                                IUtilisationMaterielRepository utilisationMaterielRepository,
                                IUserSettings userSettings) : base(applicationTools, eventAggregator,exceptionManager,
                                    loginService, navigationService, pageDialogService)



In version 15.x, the binding :     ItemsSource="{Binding Source={x:Reference rootElement},Path=BindingContext.ListUnites}"  works perfectly.

root element is the content page.

<ContentPage  xmlns="http://xamarin.com/schemas/2014/forms" 
                xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"   
                xmlns:syncfusion="clr-namespace:Syncfusion.SfDataGrid.XForms;assembly=Syncfusion.SfDataGrid.XForms"
                prism:ViewModelLocator.AutowireViewModel="False"
.......
                x:Name="rootElement"
              >


Why not working in 16.x? 

I will try to modify your example next week.




SK Suriya Kalidoss Syncfusion Team March 12, 2018 05:58 PM UTC

Hi Vincet, 
We have analyzed your query. Grid picker column is working fine from our source side. If you Provide us the modified sample it will helpful to find the solution easier. 
  
Regards, 
Suriya K 
  



DE DEV March 15, 2018 10:40 AM UTC

Hi Suriya K

I found the problem. 
My source is a list of object and I use 'ValueMemberPath' and 'DisplayMemberPath'. 


 public List<PickerModel> Names


<sfgrid:GridPickerColumn   
                    AllowEditing="True" 
                    ItemsSource="{Binding Source={x:Reference rootElement},Path=BindingContext.Names}"
                     DisplayMemberPath="Text"
                                    ValueMemberPath="Code"
                    MappingName="Customer" HeaderText="Customer"   IsHidden="False"  />
            </sfgrid:SfDataGrid.Columns>




You should see the source code in the attach file.

Thanks for your help.




Attachment: SfGrid_Sample_9c6d23e7.zip


SK Suriya Kalidoss Syncfusion Team March 16, 2018 06:23 AM UTC

Hi Vincet, 
 
We are glad that your issue has been resolved. Please let us know if your require any further assistance.  
 
Regards, 
Suriya 



DE DEV March 16, 2018 07:48 AM UTC

Hi,

You didn't understand my previous message.
I have not found the solution, I have found how to reproduce the error. 
The datagrid doen't work with a list of object.

In my previous message I have added the source code.

Thanks.





DE DEV March 20, 2018 09:48 AM UTC

Hi Suriya ,

I would like to know if you had time to find a solution to the problem.

To sum up, the datagrid picker colum doesnt work since 16.x with a list of object. I give you an example in attach project.

Thanks for yr response.

Attachment: SfGrid_Sample_3312414b.zip


JA Jayaraman Ayyanar Syncfusion Team March 20, 2018 02:29 PM UTC

Hi Vincent, 
 
Sorry for the delay. 
 
We  have checked your query. The issue for the “GridPickerColumn is Not working in 16.x” which is working fine in our side. The issue may be arise for you because you have used a ValueMemberPath and DisplayMemberPath property  from a different collection that is differ from viewmodel collection. We have cleared mentioned in the UG stating that the ValueMemberPath and DisplayMemberPath  should be from the same underlying collection that set for their respective MappingName. 
 
 
 
 
You can also refer the UG from the below link: 
 
Regards, 
Jayaraman. 



DE DEV March 20, 2018 04:57 PM UTC

Hi Jayaraman,

I don't understand what is the problem. 
I have done a new example in attach file based on your online documentation (https://help.syncfusion.com/xamarin/sfdatagrid/column-types?cs-save-lang=1&cs-lang=csharp#customization-of-picker-dropdown-values).

The picker still doesn't work. 

Thank you.

Regards

Vincent

Attachment: SfGrid_Sample_21803b3c.zip


JA Jayaraman Ayyanar Syncfusion Team March 21, 2018 02:01 PM UTC

Hi Vincent,  
 
Sorry for the inconvenienced caused. 
 
We have checked your query. The query for the “GridPickerColumn Not working in 16.x” is able to reproduce from our side when setting the ValueMemberPath and DisplayMemberPath as the same datatype for the GridPickerColumn in the latest version of our NuGet. We have also logged it as bug report. We will fix the issue and it will be rolled out for the upcoming release of our 2018 Volume 1 - service pack 2. 
   
Regards,   
Jayaraman.  



DE DEV May 15, 2018 03:28 PM UTC

Hi Jayaraman Ayyanar,

When will be the 2018 Volume 1 - service pack 2 release? 

Thank you.


AN Ashok N Syncfusion Team May 16, 2018 05:39 PM UTC

Hi Vincent,

 

Our Essential Studio Volume 1 Service Pack 2, 2018 (Version 16.1.0.37) is rolled out already and is available for download under the following link.

 

https://www.syncfusion.com/forums/137209/essential-studio-2018-volume-1-service-pack-release-v16-1-0-37-available-for-download

                                            

We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.

 

Regards,

Ashok



DE DEV September 6, 2018 03:14 PM UTC

Hi. 

Ok. Closed



VR Vigneshkumar Ramasamy Syncfusion Team September 7, 2018 10:12 AM UTC

Hi Vincent, 
 
We glad to know that your issue has been resolved. Please get in touch if you required further assistance on this. 
   
Regards 
Vigneshkumar R 


Loader.
Up arrow icon