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

StyleSelector null-return bug

4 Answers 15 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Aleksey
Top achievements
Rank 1
Aleksey asked on 14 May 2014, 11:09 AM
Have view with RadGridView with RowStyleSelector:
<telerik:RadGridView
 ...
      RowStyleSelector="{StaticResource myStyle}"
...
/>

And resources is:
<Grid.Resources>
  <localss:MyStyle x:Key="myStyle">
    <localss:MyStyle.UneditableStyle>
      <Style TargetType="telerik:GridViewRow" BasedOn="{StaticResource GridViewRowStyle}">
        <Setter Property="Background" Value="LightGray" />
      </Style>
    </localss:MyStyle.UneditableStyle>
  </localss:MyStyle>
</Grid.Resources>



RowStyleSelector is next:
public class MyStyle: StyleSelector
{
    public override Style SelectStyle(object item, DependencyObject container)
    {
        var s = item as MyObject;
        if (s == null)
            return null;
        if (!s.Editable)
            return UneditableStyle;
        return null;           
    }
     
    public Style UneditableStyle { get; set; }
}

In Silverlight UI 2013 Q3 appear following bug:
When s.Editable is false, style color (UneditableStyle) row correct.
When s.Editable becomes true, SelectStyle return null , but row was still colored and it's style is UneditableStyle, not default style (no style) as it was in 2013 Q2. But it must be default.

4 Answers, 1 is accepted

Sort by
0
Aleksey
Top achievements
Rank 1
answered on 15 May 2014, 10:15 AM
2013Q3SP2 fix it.
0
Aleksey
Top achievements
Rank 1
answered on 15 May 2014, 01:17 PM
Oh, not. Maybe not. Visual Studio option for Silverlight "Reduce XAP size by using application library caching" run old version so I cannot try it now.
0
Yoan
Telerik team
answered on 16 May 2014, 03:21 PM
Hello Aleksey,

Indeed, you are right. I was able to reproduce the problem with our latest version of RadGridView. I have logged this issue in our bug tracking system for further investigation.

Thank you for reporting this, I updated your Telerik points accordingly. 


Regards,
Yoan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Yoan
Telerik team
answered on 02 Jun 2014, 04:49 PM
Hello Aleksey,

Just a quick follow-up : 

The problem has been logged into our Feedback portal as bug report. You can track the status of the issue by following the feedback item: Row's style is not updated when the SelectStyle method of RowStyleSelector returns null. Once we have a progress we will change its status.

Regards,
Yoan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GridView
Asked by
Aleksey
Top achievements
Rank 1
Answers by
Aleksey
Top achievements
Rank 1
Yoan
Telerik team
Share this question
or