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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SelectedItem to null when I change TabItem

Thread ID:

Created:

Updated:

Platform:

Replies:

129314 Mar 11,2017 05:41 PM UTC Mar 23,2017 03:18 PM UTC WPF 7
loading
Tags: SfDataGrid
Fabio
Asked On March 11, 2017 05:41 PM UTC

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

Muthukumar Kalyanasundaram [Syncfusion]
Replied On 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 


Fabio
Replied On 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

Muthukumar Kalyanasundaram [Syncfusion]
Replied On 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 
 


Fabio
Replied On 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

Muthukumar Kalyanasundaram [Syncfusion]
Replied On 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  
 


Fabio
Replied On March 22, 2017 06:59 AM UTC

Hi,
this is an example:

Regards

Attachment: provaselecteditem_74d3e55d.rar

Muthukumar Kalyanasundaram [Syncfusion]
Replied On 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 


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.

Please sign in to access our forum

or the page will be automatically redirected to sign-in page in 10 seconds.

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

;