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

Row Style causing crash in certain versions of Silverlight

3 Answers 49 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jason
Top achievements
Rank 1
Jason asked on 02 Mar 2012, 03:55 PM
Hi,

We are facing a problem with a GridViewRow style causing our silverlight application to crash when run in a certain version of silverlight.

First, the technical information.  We are developing using the Telerik Q3 2011 SP1 release.  We are also using the Silverlight 4 SDK version 4.0.50826.0.  The computer that is facing this crash is running Silverlight client version 4.0.50917.0.

Now, here is the issue.  Within our application, we have a XAML page containing various styles for our different controls.  We recently added the following style to that page:

<Style TargetType="telerik:GridViewRow" x:Key="RadGridViewRowStyle">
    <Setter Property="IsExpandable" Value="{Binding IsExpandable}" />
    <Setter Property="IsExpanded" Value="{Binding IsExpanded, Mode=TwoWay}" />
</Style>

We have then added the appropriate style links to each RadGridView that this style is used for.  The code was installed so that we could monitor the hierarchies we are displaying, hiding the expansion button if an object has no children as well as noting which items are expanded so that if the page is refreshed we can re-expand everything back to their former state.

When we run and test this code on our development machines, it works just fine.  I should note that on our development machines, we each have the Silverlight 5 client installed.  In this environment, everything works fine.

When this code is run on a client machine using the Silverlight 4 client noted above, it causes the application to crash.  We receive a generic Silverlight 2103 error when the application is trying to load, and then nothing else happens.  If we comment out the two Setter Property lines in the above style, the application will then load just fine even under that Silverlight 4 client.


Is this a Telerik bug, or a Silverlight client bug?  Our client is a government agency that is constrained to using Silverlight 4 (of the specific version I mentioned) so having them upgrade to Silverlight 5 is not an option.  Are there any possible solutions that you would suggest?

Thank you,
Jason

3 Answers, 1 is accepted

Sort by
0
Ivan Ivanov
Telerik team
answered on 07 Mar 2012, 11:31 AM
Hi Jason,

Binding in style setters is not supported in Silverlight 4. For the Silverlight platform, it has been introduced as a new feature with Silverlight 5. Please refer to this msdn article, especially the "Bindings in a Style Setter..." paragraph.

All the best,
Ivan Ivanov
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Christian
Top achievements
Rank 1
answered on 25 Apr 2012, 12:28 PM
I am trying this approach to bind IsExpandable with Sl5 without success.

In the wpf forum I found a behavior for this, but it uses BindingOperations.ClearBinding, which does not exist in Sl.
Can you provide any workaround?

Best Regards
0
Dimitrina
Telerik team
answered on 27 Apr 2012, 09:31 AM
Hello,

 The binding to IsExpandable is possible with Q1 2012 version of the RadControls (targeting Silverlight 5). Would you please check with this version? 

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
GridView
Asked by
Jason
Top achievements
Rank 1
Answers by
Ivan Ivanov
Telerik team
Christian
Top achievements
Rank 1
Dimitrina
Telerik team
Share this question
or