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.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Migrating from 13.4.0.58 to 15.0.1.33 showing all SfDataGrid->cell as Invalid Red Mark

Thread ID:

Created:

Updated:

Platform:

Replies:

130101 Apr 21,2017 01:04 PM UTC May 3,2017 02:37 PM UTC WPF 7
loading
Tags: SfDataGrid
ajay murudkar
Asked On April 21, 2017 01:04 PM UTC

Hello,

Our application was on Syncfusion version - 13.4.0.58 and everything was working good.
Then I downloaded Syncfusion version - 15.0.1.33 and all the Cells in the SFDataGrid started showing Invalid Red Mark.

Can you please tell me what's wrong here? Do I have to change any code or anything?

Literally all Grids gets shown with the Red Invalid mark on cell's RHS top corner.

Thanks,
Ajay

Muthukumar Kalyanasundaram [Syncfusion]
Replied On April 25, 2017 04:06 AM UTC

Hi Ajay,   
   
Thank you for contacting Syncfusion support.   
   
We have checked your query. We were unable to reproduce the reported “showing all GridCell as invalid red mark” at our end. For your reference, we have attached the sample in below location and you can refer to it.  
   
   
Please share some more information about your application   
1.       Customize the validation of grid cell.   
2.       Customize the style of grid cell.   
   
Or else provide a simple sample to reproduce your reported scenario to analyze further and provide an appropriate solution.  
   
Regards,                 
Muthukumar K 

ajay murudkar
Replied On April 25, 2017 03:52 PM UTC

Hi Muthu,

I saw similar sample from some previous post, that works OK.
I hard-coded the GridValidationMode="None" at Grid level and Column Level and during debug I can see it has Value = "None" but still ends up with red Mark without any error message as we haven't attached any error messages to any fields.

Haven't you came across to any such situation from anybody else?

Same code works OK with 13.4.0.58 version.

Thanks,
Ajay

Muthukumar Kalyanasundaram [Syncfusion]
Replied On April 26, 2017 01:59 PM UTC

Hi Ajay, 

Thanks for the update. 

We have checked your query. If it is possible to modifying the attached sample based on your application along with the replication procedure?. Could you please share some more information about your application    
1.       Customize the validation of grid cell.    
2.       Customize the style of grid cell.    
 
 
Otherwise we would like to arrange for a Meeting to debug the issue at your end? Please make your all requirements for your scenario and show us your requirements at the time of meeting. This would be helpful for us to provide an appropriate solution.  

Please let us know if you have any query. 
 
Regards, 
Muthukumar K 


ajay murudkar
Replied On April 27, 2017 01:08 PM UTC

Hi Muthu,

Just realised that we are using some Validation via VisualStateManager,  and for unknown reasons all cells coming back with a state of "HasError", see the Visual StateManager xaml


<VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="IndicationStates">
                                <VisualState x:Name="HasError">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="PART_InValidCellBorder">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                                            <EasingDoubleKeyFrame KeyTime="0" Value="10"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="NoError">
                                    <Storyboard BeginTime="0">
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Width" Storyboard.TargetName="PART_InValidCellBorder">
                                            <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                                            <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="BorderStates">
                                <VisualState x:Name="NormalCell"/>
                                <VisualState x:Name="FooterColumnCell">
                                    <Storyboard BeginTime="0">
                                        <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0" Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="PART_GridCellBorder">
                                            <EasingThicknessKeyFrame KeyTime="0" Value="1,0,1,1"/>
                                        </ThicknessAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="BeforeFooterColumnCell">
                                    <Storyboard BeginTime="0">
                                        <ThicknessAnimationUsingKeyFrames BeginTime="0" Duration="1.0:0:0" Storyboard.TargetProperty="BorderThickness" Storyboard.TargetName="PART_GridCellBorder">
                                            <EasingThicknessKeyFrame KeyTime="0" Value="0,0,0,1"/>
                                        </ThicknessAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>

with older version of Syncfusion its working correctly.

Muthukumar Kalyanasundaram [Syncfusion]
Replied On April 30, 2017 08:25 AM UTC

Hi Ajay, 
 
Thanks for the update. 
 
We have checked your provided code snippet. Compared to version 13.4 to 15.1.0.33, we are made some changes in style of GridCell as like below code. For your reference, we have attached the sample in below location. Could you please refer to it.   
 
Code Snippet: 
 
<Style TargetType="syncfusion:GridCell"> 
    . . . . . 
    <Setter Property="Template"> 
        <Setter.Value> 
            <ControlTemplate TargetType="syncfusion:GridCell"> 
                <Grid SnapsToDevicePixels="True"> 
                    <VisualStateManager.VisualStateGroups> 
                        <VisualStateGroup x:Name="IndicationStates"> 
 
                            <VisualState x:Name="HasError"> 
                                <Storyboard> 
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_InValidCellBorder" Storyboard.TargetProperty="Width"> 
                                        <EasingDoubleKeyFrame KeyTime="0" Value="0" /> 
                                        <EasingDoubleKeyFrame KeyTime="0" Value="10" /> 
                                    </DoubleAnimationUsingKeyFrames> 
                                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PART_InValidCellBorder" Storyboard.TargetProperty="(UIElement.Visibility)"> 
                                        <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/> 
                                    </ObjectAnimationUsingKeyFrames> 
                                </Storyboard> 
                            </VisualState> 
 
                            <VisualState x:Name="NoError"> 
                                <Storyboard BeginTime="0"> 
                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetName="PART_InValidCellBorder" Storyboard.TargetProperty="Width"> 
                                        <EasingDoubleKeyFrame KeyTime="0" Value="1" /> 
                                        <EasingDoubleKeyFrame KeyTime="0" Value="0" /> 
                                    </DoubleAnimationUsingKeyFrames> 
                                    <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="PART_InValidCellBorder" Storyboard.TargetProperty="(UIElement.Visibility)"> 
                                        <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Collapsed}"/> 
                                    </ObjectAnimationUsingKeyFrames> 
                                </Storyboard> 
                            </VisualState> 
                        </VisualStateGroup> 
       . . . . . 
 
       . . . . . 
 
                    <Border x:Name="PART_InValidCellBorder" 
                    Width="10" 
                    Height="10" 
                    HorizontalAlignment="Right"  
                    Visibility="Collapsed" 
                    VerticalAlignment="Top" 
                    SnapsToDevicePixels="True"> 
       . . . . . 
                    </Border> 
                </Grid> 
            </ControlTemplate> 
        </Setter.Value> 
    </Setter> 
</Style> 
 
 
 
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 


ajay murudkar
Replied On May 2, 2017 11:46 AM UTC

Thanks a lot Muthu,

I have replaced <Border tag for PART _GridCellBorder and PART_InvalidCellBorder with my xaml and I can straight away replicate my issue.

Just after the following xaml

<Border Background="{TemplateBinding CellSelectionBrush}"
                            SnapsToDevicePixels="True"
                            Visibility="{TemplateBinding SelectionBorderVisibility}" />

After above xaml - replaced following
---Replaced with the following ---


<Border x:Name="PART_GridCellBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" 
                                Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
                                <Grid>
                                    <ContentPresenter ContentTemplate="{TemplateBinding ContentTemplate}" Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}" Margin="{TemplateBinding Padding}"/>
                                </Grid>
                            </Border>
                            <Border Background="Transparent" IsHitTestVisible="False" SnapsToDevicePixels="True" />
                            <Border x:Name="PART_InValidCellBorder" HorizontalAlignment="Right" Height="10" SnapsToDevicePixels="True" VerticalAlignment="Top" Width="10">
                                <Border.ToolTip>
                                    <ToolTip Background="{DynamicResource Scheme_Red}" PlacementRectangle="20,0,0,0" Placement="Right">
                                        <!--Tag="{TemplateBinding ErrorMessage}" -->
                                        <ToolTip.Template>
                                            <ControlTemplate>
                                                <Grid x:Name="Root" Margin="5,0" Opacity="0" RenderTransformOrigin="0,0">
                                                    <Grid.RenderTransform>
                                                        <TranslateTransform X="-25"/>
                                                    </Grid.RenderTransform>
                                                    <VisualStateManager.VisualStateGroups>
                                                        <VisualStateGroup x:Name="OpenStates">
                                                            <VisualStateGroup.Transitions>
                                                                <VisualTransition From="{x:Null}" GeneratedDuration="0" GeneratedEasingFunction="{x:Null}" Storyboard="{x:Null}" To="{x:Null}"/>
                                                                <VisualTransition From="{x:Null}" GeneratedDuration="0:0:0.2" GeneratedEasingFunction="{x:Null}" To="Open">
                                                                    <Storyboard>
                                                                        <DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform">
                                                                            <DoubleAnimation.EasingFunction>
                                                                                <BackEase Amplitude="0.3" EasingMode="EaseOut"/>
                                                                            </DoubleAnimation.EasingFunction>
                                                                        </DoubleAnimation>
                                                                        <DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                                                                    </Storyboard>
                                                                </VisualTransition>
                                                            </VisualStateGroup.Transitions>
                                                            <VisualState x:Name="Closed">
                                                                <Storyboard>
                                                                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                            <VisualState x:Name="Open">
                                                                <Storyboard>
                                                                    <DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform"/>
                                                                    <DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root"/>
                                                                </Storyboard>
                                                            </VisualState>
                                                        </VisualStateGroup>
                                                    </VisualStateManager.VisualStateGroups>
                                                    <Border Background="#052A2E31" CornerRadius="5" Margin="4,4,-4,-4"/>
                                                    <Border Background="#152A2E31" CornerRadius="4" Margin="3,3,-3,-3"/>
                                                    <Border Background="#252A2E31" CornerRadius="3" Margin="2,2,-2,-2"/>
                                                    <Border Background="#352A2E31" CornerRadius="2" Margin="1,1,-1,-1"/>
                                                    <Border Background="#FFDC000C" CornerRadius="2"/>
                                                    <Border CornerRadius="2">
                                                        <TextBlock Foreground="White" MaxWidth="250" Margin="8,4" TextWrapping="Wrap" Text="{TemplateBinding Tag}" UseLayoutRounding="False"/>
                                                    </Border>
                                                </Grid>
                                            </ControlTemplate>
                                        </ToolTip.Template>
                                    </ToolTip>
                                </Border.ToolTip>
                                <Path Data="M0.5,0.5L12.652698,0.5 12.652698,12.068006z" Fill="Red" Stretch="Fill" SnapsToDevicePixels="True"/>
                            </Border>


-----

When I change the combo box..I get back the expected behavior, same happening at my end..
Just for your reference sending you MainWindow.xaml file

Attachment: MainWindow_52f10358.zip

Muthukumar Kalyanasundaram [Syncfusion]
Replied On May 3, 2017 02:37 PM UTC

Hi Ajay, 

Thanks for the update. 

We have checked your provided code snippet. In the code, the visibility is visible for PART_InValidCellBorder, so the red mark is showing for all the cell in SfDataGrid. You can overcome this problem by setting Visibility as Collapsed. For your reference, we have attached the sample in the below location. Could you please refer to it. 

Code Snippet: 

<Border x:Name="PART_InValidCellBorder" HorizontalAlignment="Right" Height="10" SnapsToDevicePixels="True" VerticalAlignment="Top" Width="10" Visibility="Collapsed"> 
  <Border.ToolTip> 
     <ToolTip Background="{DynamicResource Scheme_Red}" PlacementRectangle="20,0,0,0" Placement="Right"> 
        <!--Tag="{TemplateBinding ErrorMessage}" --> 
        <ToolTip.Template> 



Please let us know if you have any query. 

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.

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

;