This is a migrated thread and some comments may be shown as answers.

Problem with validation notifications

4 Answers 112 Views
TabControl
This is a migrated thread and some comments may be shown as answers.
Rayne
Top achievements
Rank 1
Rayne asked on 02 Jun 2011, 10:02 PM
I have a tab control that has several tabs. each tab has a user control. All of the user controls are bound to an EF entity via viewModel binding. I've implemented some custom validation to my EF entity using IDataErrorInfo.

The main control is databound to master viewModel. Each child user control (which represents the contents of a tab) has its datacontext set to a property on the master viewModel (these properties are child viewmodels). These child VM are being instantiated once the master gets the entity from EF.

When I create a new tab control (for an entity), when it initially displays on the screen all my controls that are validation aware show the red outline I've defined for all properties that are required. But if I switch to a different tab then come back, the outlines are gone even though the value still doesn't pass validation. How do I fix this?

Is it in the way I have my UI designed? I can change it if needed, just not sure how.

4 Answers, 1 is accepted

Sort by
0
Rayne
Top achievements
Rank 1
answered on 02 Jun 2011, 10:08 PM
The key was to set the IsContentPreserved property on the TabControl. I've been searching for this for a while now. Not sure why I kept missing it.
0
Rayne
Top achievements
Rank 1
answered on 02 Jun 2011, 10:20 PM
Discovered something else. I can set the IsContentPreserved and it keeps the outlines for the selected tab. But I've got another tab that isn't selected when the control loads. It has a validation aware control as well, and the outlines are not showing up for it. The tooltip is showing when I hover over the control, but the red outlines are not showing.
0
Petar Mladenov
Telerik team
answered on 08 Jun 2011, 09:36 AM
Hi Rayne,

We will need more info in order to advice you better. From this view point we cannot tell what causes this behavior. Could you please send us runnable sample demonstrating this behavior ? This way we will investigate it faster. Thank you for your cooperation.

Regards,
Petar Mladenov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Rayne
Top achievements
Rank 1
answered on 08 Jun 2011, 02:42 PM
Will submit a sample solution. Thanks.
Tags
TabControl
Asked by
Rayne
Top achievements
Rank 1
Answers by
Rayne
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or