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

SelectedItem to null when I change TabItem

HI,
If I have two sfdatagrid within of different tabitems, the selecteditem losts focus and it is set to null when I select another tabitem with mvvm logic and usercontrols

Regards

7 Replies

MK Muthukumar Kalyanasundaram Syncfusion Team March 13, 2017 02:00 PM UTC

Hi Fabio, 

Thank you for contacting Syncfusion support. 

We have checked your query. We are unable to reproduce the reported “SelectedItem to null when I change TabItem” in our end. For your reference, we have attached the sample in below location. In the attached sample, the focus is present in the selected item when we move into two different tabs. Could you please refer it. 


If you are still facing the issue, could you please revert by modifying the attached sample based on your application along with the replication procedure? This would be helpful for us to provide an appropriate solution.  

Please let us know if you have any query. 

Regards, 
Muthukumar K 



FA Fabio March 14, 2017 07:07 AM UTC

Hi,
I attach a sample project.
You pay attention to "Selected..." property on change active tabitem after to have selected an item

Regards

Attachment: provaselecteditem_ae0ce751.rar


MK Muthukumar Kalyanasundaram Syncfusion Team March 15, 2017 12:44 PM UTC

Hi Fabio, 
 
We have analyzed the issue with provided sample. When switching between the tabs, each time new UserControl being created. You can check this by placing break point in UserContorl constructor. So, each time new SfDataGrid is created when switching tab. So based on the SelectedItem from ViewModel selection rendered in the row with first cell as current cell. It’s not an issue with SfDataGrid.  
 
Please let us know if you have any query.

Regards,
 
Muthukumar K 
 



FA Fabio March 16, 2017 07:12 AM UTC

Hi,
if you substitute within "ucAnimals" user control the sfDataGrid with Microsoft DataGrid, you'll see that SelectedItem is not null and "ucAnimals" will not be recreated.

Regards


MK Muthukumar Kalyanasundaram Syncfusion Team March 20, 2017 03:49 AM UTC

Hi Fabio,  

Thanks for the update. 
  
We have analyzed your query.  We have substituted the Microsoft DataGrid within the user control, while  navigating from one tab to another tab, each time the UserControl has been recreated and the selected item to be null. The same issue is reproduce in MS dataGrid also.  If the issue is not reproduce in MS dataGrid, could you please provide us a simple video file or replication procedure to reproduce the issue so that it would be more helpful for us to analysis further. 
  
Please let us know if you have any query.

Regards,  
Muthukumar K  
 



FA Fabio March 22, 2017 06:59 AM UTC

Hi,
this is an example:

Regards

Attachment: provaselecteditem_74d3e55d.rar


MK Muthukumar Kalyanasundaram Syncfusion Team March 23, 2017 03:18 PM UTC

Hi Fabio,  
 
We have analyzed your query and we have created a support incident to track the status of this forum has been created under your account. Please log on to our support website to check for further updates  
   
Please let me know if you have any questions.  
   
Regards,  
Muthukumar K 


Loader.
Live Chat Icon For mobile
Up arrow icon