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. Image for the cookie policy date

Groupbar ItemsSource Binding

Hi, I would like to know if it's possible to bind Groupbar's ItemsSource to an ObservableCollection.

MyType class contains only one property - Info (string).

I have defined a DataTemplate in the UserControl.Resources section:







and assigned this template to Groupbar:

EnableItemsDragging="False" ItemTemplate="{StaticResource template}" ItemsSource="{Binding GroupBarItems}">

GroupBarItems is a collection in my ViewModel. This collection is instantiated correctly...

When I run my Silverlight app I am getting this error:

Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.NullReferenceException: Object reference not set to an instance of an object.
v Syncfusion.Windows.Tools.Controls.GroupBar.LoadTemplateChildren()
v Syncfusion.Windows.Tools.Controls.GroupBar.OnApplyTemplate()
v System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)

Can you please give me an advice?

Thank you.




7 Replies

DC David C Syncfusion Team September 21, 2010 05:52 AM UTC

Hi Jan,

Sorry for the delay to get back to you. We are able to reproduce the issue in GroupBar when we try to do the code snippet you provided. We have logged an issue report for this issue. As we will not be able to update you the Patch through the forum, we have created the new incident 72310 to update you the custom assemblies. We would be updating you the fix within 09/24/2010.

Please let us know if you have any queries.

Regards,
David C



JR Justin Robertson April 1, 2011 02:01 PM UTC

Has there been any resolution to this issue?



SK Sakthi Kumar A Syncfusion Team April 12, 2011 04:25 AM UTC

Hi Jan,

We have fixed the ItemSource binding issue in GroupBar and the fix was provided through the Direc-Trac incident ID #72310. This fix is also available in our current version of Essential Studio.

Please let us know if you have any queries.

Regards,
Sakthi




JR Justin Robertson April 15, 2011 07:52 PM UTC

When I try to bind the groupbar to a collection as coded above, the header text of my items are set to the collection object name. Could someone post an example of databinding with the groupbar? It is not present in the documentation either.



SK Sakthi Kumar A Syncfusion Team April 26, 2011 06:47 AM UTC

Hi Jan,

Sorry for the delay.

We have created the Group Bar sample for ItemsSource collection binding. Please find the sample under the following location.

Please let us know if you have any queries.

Regards,
Sakthi



CS_6ae8b06a.zip


JR Justin Robertson April 27, 2011 01:41 PM UTC

Sakthi,

Thanks for your response, but this is a WPF solution. Could you attach one for Silverlight?



SK Sakthi Kumar A Syncfusion Team June 2, 2011 01:16 PM UTC

Hi Jan,

Sorry for the inconvenience caused.

We encounter the crash issue when bound the GroupBar using ItemsSource and we have logged the defect report internally. We would be working on this, If you interested in getting a patch for this issue, then you may create a Direct-Trac incident under the following link.

http://www.syncfusion.com/Account/Logon ReturnUrl=%2fsupport%2fdirecttrac

Please let us know if you have any queries.

Regards,
Sakthi


Loader.
Live Chat Icon For mobile
Up arrow icon