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

"The parameter is incorrect" - OnNotifyPropertyChanged

5 Answers 175 Views
DataBoundListBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Charles
Top achievements
Rank 2
Charles asked on 15 Feb 2011, 03:00 PM
Having some issues with using the RadDataboundListbox.

I'm using a simple ViewModel that calls an "OnNotifyPropertyChanged" method that, in turn, fires the PropertyChanged event for a list of custom objects. When I use a regular ListBox there isn't any problem...it works fine. When I use the RadDataboundListBox I get an exception when the PropertyChanged event attempts to create a new PropertyChangedEventArgs with the name of the property passed in as a string. I get "The parameter is incorrect".

I originally thought that this was something I was doing because I had a more complicated scenario where the view model was getting created globally. I changed that and I still have the problem.

Also, if I used the RadDataBoundListBox without an itemtemplate and without a datatemplate (using DisplayMemberPath to display listbox items) all was well. The problem seemed to start when I added the data template.
(Edit: I just tested this again - using only DisplayMemberPath - and the problem still occurs.)

I've included here the XAML snippet that includes the RadDataboundListbox and the commented ListBox (I have an identical listbox commented out. That is the piece that works). I've also included code for the view model - but I had to censor the "apikey" variable that I use. This particular application calls out to the NY Times API and that key is assigned to me, so I can't share it. Finally, I included the code-behind for the page. (I've commented out portions of code that were being used to save state for tombstoning purposes...because I thought that might have been a problem as well.)

To add a bit more detail..the listbox is populated after a button press calls the GetMembers() method in the view model. The Session and Chamber properties in the view model are bound to the RadListPicker SelectedItem properties and that is all working fine. There are values in those properties otherwise there would be an issue with the GetMembers() method. The issue doesn't manifest itself until the Members collection attempts a notification that it has changed.

That's about it. Thanks in advance for any guidance.

<telerikPrimitives:RadDataBoundListBox x:Name="lboMembers"
                                       Grid.Row="1"
                                       Grid.Column="0"
                                       Grid.ColumnSpan="3"
                                       ItemsSource="{Binding Members}"
                                       SelectionChanged="lboMembers_SelectionChanged">
    <telerikPrimitives:RadDataBoundListBox.ItemTemplate>
        <DataTemplate>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0"
                           Text="{Binding FullName}"
                           Width="300"
                           Style="{StaticResource PhoneTextNormalStyle}"/>
                <TextBlock Grid.Column="1"
                           Text="{Binding State}"
                           Style="{StaticResource PhoneTextNormalStyle}" />
                <TextBlock Grid.Column="2"
                           Text="{Binding Party}"
                           Style="{StaticResource PhoneTextNormalStyle}"/>
                  
            </Grid>
        </DataTemplate>
    </telerikPrimitives:RadDataBoundListBox.ItemTemplate>
</telerikPrimitives:RadDataBoundListBox>
<!--<ListBox x:Name="lboMembers"
         Grid.Row="1"
         Grid.Column="0"
         Grid.ColumnSpan="3"
         ItemsSource="{Binding Members}"
         SelectionChanged="lboMembers_SelectionChanged">
    <ListBox.ItemTemplate>
        <DataTemplate>
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0"
                           Text="{Binding FullName}"
                           Width="300"
                           Style="{StaticResource PhoneTextNormalStyle}" />
                <TextBlock Grid.Column="1"
                           Text="{Binding State}"
                           Style="{StaticResource PhoneTextNormalStyle}" />
                <TextBlock Grid.Column="2"
                           Text="{Binding Party}"
                           Style="{StaticResource PhoneTextNormalStyle}" />
            </Grid>
        </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox>-->

public class MembersVM : INotifyPropertyChanged
{
    private readonly string uriStart = "http://api.nytimes.com/svc/politics/v3/us/legislative/congress/";
    private readonly string apiKey = "cannot share this value.....";
       
    private string uriString;
    public MembersVM()
    {
        uriString = uriStart + "{0}/{1}/members.xml?api-key=" + apiKey;
    }
    #region Methods
    public void GetMembers()
    {
        uriString = string.Format(uriString, Session, Chamber);
        Uri serviceUri = new Uri(uriString);
        WebClient client = new WebClient();
        //IsBusy = true;
        client.OpenReadAsync(serviceUri);
        client.OpenReadCompleted += (s, e) =>
        {
            List<Member> tmpList = new List<Member>();
            ObservableCollection<Member> obsvHolder = new ObservableCollection<Member>();
            if (e.Error != null)
            {
                // add error message, logging, etc...
                string sError = e.Error.Message;
            }
            else
            {
                using (Stream st = e.Result)
                {
                    XDocument doc = XDocument.Load(st);
                    foreach (var x in doc.Descendants("member"))
                    {
                        tmpList.Add(CreateValidMember(x));
                    }
                    // Order by state
                    var query = from m in tmpList
                                orderby m.State
                                select m;
                    tmpList = query.ToList();
                    // Convert list to ObservableCollection
                    foreach (var member in tmpList)
                    {
                        member.FullName = member.FirstName + " " + member.LastName;
                        obsvHolder.Add(member);
                    }
                    // Set the property
                    Members = obsvHolder;
                }
            }
            //IsBusy = false;
        };
    }
    private Member CreateValidMember(XElement e)
    {
        Member m = new Member();
        m.Id = e.Element("id").Value;
        m.FirstName = e.Element("first_name").Value;
        m.LastName = e.Element("last_name").Value;
        m.Party = e.Element("party").Value;
        m.State = e.Element("state").Value;
        m.ApiUrl = e.Element("api_uri").Value;
        m.Seniority = e.Element("seniority") != null ?
            Convert.ToInt32(e.Element("seniority").Value) : 0;
        m.NextElection = e.Element("next_election") != null ?
            Convert.ToInt32(e.Element("next_election").Value) : 0;
        m.MissedPct = e.Element("missed_votes_pct") != null ?
            Convert.ToDouble(e.Element("missed_votes_pct").Value) : 0;
        m.PartyLineVote = e.Element("votes_with_party_pct") != null ?
            Convert.ToDouble(e.Element("votes_with_party_pct").Value) : 0;
        m.District = Chamber.Equals("House") ?
            Convert.ToInt32(e.Element("district").Value) : 0;
        return m;
    }
    #endregion
      
    #region Properties
    private ObservableCollection<Member> members;
    public ObservableCollection<Member> Members
    {
        get { return members; }
        set
        {
            if (members != value)
            {
                members = value;
                //this.NotifyPropertyChanged(m => m.Members);
                OnNotifyPropertyChanged("Members");
            }
        }
    }
    private string session;
    public string Session
    {
        get { return session; }
        set
        {
            if (session != value)
            {
                session = value;
                //this.NotifyPropertyChanged(m => m.Session);
                OnNotifyPropertyChanged("Session");
            }
        }
    }
    private string chamber;
    public string Chamber
    {
        get { return chamber; }
        set
        {
            if (chamber != value)
            {
                chamber = value;
                //this.NotifyPropertyChanged(m => m.Chamber);
                OnNotifyPropertyChanged("Chamber");
            }
        }
    }
    private Member selectedMember;
    public Member SelectedMember
    {
        get { return selectedMember; }
        set
        {
            if (selectedMember != value)
            {
                selectedMember = value;
                //this.NotifyPropertyChanged(m => m.SelectedMember);
                OnNotifyPropertyChanged("SelectedMember");
            }
        }
    }
    #endregion
    #region INotifyPropertyChanged Members
    public event PropertyChangedEventHandler PropertyChanged;
    #endregion
    public void OnNotifyPropertyChanged(string p)
    {
        if (PropertyChanged != null)
        {
            PropertyChanged(this, new PropertyChangedEventArgs(p));
        }
    }
}

public partial class MainPage : PhoneApplicationPage
{
    private MembersVM vm;
    // Constructor
    public MainPage()
    {
        InitializeComponent();
        vm = new MembersVM();
        DataContext = vm;
    }
    private void btnGo_Click(object sender, RoutedEventArgs e)
    {
        vm.GetMembers();
    }
    private void lboMembers_SelectionChanged(object sender, SelectionChangedEventArgs e)
    {
        if (lboMembers.SelectedItem != null)
        {
            vm.SelectedMember = lboMembers.SelectedItem as Member;
            NavigationService.Navigate(new Uri("/MemberDetail.xaml", UriKind.Relative));
        }
    }
    //protected override void OnNavigatedFrom(NavigationEventArgs e)
    //{
    //    State["members"] = App.AppVM.Members;
    //    State["session"] = App.AppVM.Session;
    //    State["chamber"] = App.AppVM.Chamber;
    //}
    //protected override void OnNavigatedTo(NavigationEventArgs e)
    //{
    //    if (State.ContainsKey("members") && State.ContainsKey("session") && State.ContainsKey("chamber"))
    //    {
    //        App.AppVM.Members = State["members"] as ObservableCollection<Member>;
    //        App.AppVM.Session = State["session"] as string;
    //        App.AppVM.Chamber = State["chamber"] as string;
    //    }
    //}
}

5 Answers, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 17 Feb 2011, 01:14 PM
Hello Charles,

Thanks for contacing us and for the provided code snippets.

Unfortunately based on these code snippets I cannot exactly estimate what causes the issue you experience. Could you please provide us with the stack trace at the point where the problem occurs or maybe a small sample application with dummy data that we can use to reproduce the exception?

In this way we will be able to thoroughly examine the scenario and see what causes the issue.

Thanks for your understanding and for the time taken.

Greetings,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Charles
Top achievements
Rank 2
answered on 17 Feb 2011, 02:54 PM
I've captured two stack traces and included them here. The exception is thrown only when I use the RadDataboundListBox and it occurs when the PropertyChanged event is fired.

This is the stack trace when I use the RadDataboundListBox:
  System.Windows.dll!MS.Internal.XcpImports.CheckHResult(uint hr = 2147942487) + 0xe bytes 
  System.Windows.dll!MS.Internal.XcpImports.SetValue(MS.Internal.INativeCoreTypeWrapper obj = {Telerik.Windows.Controls.RadDataBoundListBoxItem}, System.Windows.DependencyProperty property = {System.Windows.CoreDependencyProperty}, double d = Infinity) + 0x31 bytes 
  System.Windows.dll!System.Windows.DependencyObject.SetValue(System.Windows.DependencyProperty property = {System.Windows.CoreDependencyProperty}, double d = Infinity) + 0x31 bytes 
  System.Windows.dll!System.Windows.FrameworkElement.Width.set(double value = Infinity) + 0xc bytes 
  Telerik.Windows.Controls.Primitives.dll!Telerik.Windows.Controls.RadVirtualizingDataControl.MeasureContainer(Telerik.Windows.Controls.RadVirtualizingDataControlItem container = {Telerik.Windows.Controls.RadDataBoundListBoxItem}) + 0x11 bytes 
  Telerik.Windows.Controls.Primitives.dll!Telerik.Windows.Controls.RadVirtualizingDataControl.GetContainerForItem(Telerik.Windows.Data.IDataSourceItem item = {Telerik.Windows.Data.DataSourceItem}, bool insertLast = true) + 0x68 bytes 
  Telerik.Windows.Controls.Primitives.dll!Telerik.Windows.Controls.RadVirtualizingDataControl.ManageVisualSequenceFromViewportBottom() + 0x123 bytes 
  Telerik.Windows.Controls.Primitives.dll!Telerik.Windows.Controls.RadVirtualizingDataControl.BalanceVisualSpace() + 0xf bytes 
  Telerik.Windows.Controls.Primitives.dll!Telerik.Windows.Controls.RadVirtualizingDataControl.OnCollectionReset() + 0x46 bytes 
  Telerik.Windows.Controls.Primitives.dll!Telerik.Windows.Controls.RadVirtualizingDataControl.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e = {System.Collections.Specialized.NotifyCollectionChangedEventArgs}) + 0x81 bytes 
  Telerik.Windows.Controls.Primitives.dll!Telerik.Windows.Controls.RadDataBoundListBox.OnItemsChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e = {System.Collections.Specialized.NotifyCollectionChangedEventArgs}) + 0x7 bytes 
  Telerik.Windows.Controls.Primitives.dll!Telerik.Windows.Controls.RadVirtualizingDataControl.OnListSource_CollectionChanged(object sender = {Telerik.Windows.Data.RadListSource}, System.Collections.Specialized.NotifyCollectionChangedEventArgs e = {System.Collections.Specialized.NotifyCollectionChangedEventArgs}) + 0x7 bytes 
  Telerik.Windows.Core.dll!Telerik.Windows.Data.RadListSource.OnCollectionChanged(System.Collections.Specialized.NotifyCollectionChangedEventArgs e = {System.Collections.Specialized.NotifyCollectionChangedEventArgs}) + 0x15 bytes 
  Telerik.Windows.Core.dll!Telerik.Windows.Data.RadListSource.RefreshOverride() + 0x30 bytes 
  Telerik.Windows.Core.dll!Telerik.Windows.Data.RadListSource.Refresh() + 0x21 bytes 
  Telerik.Windows.Core.dll!Telerik.Windows.Data.RadListSource.AttachData(System.Collections.IEnumerable data = {System.Collections.ObjectModel.ObservableCollection<GovtPhone.ViewModels.Member>}) + 0x85 bytes 
  Telerik.Windows.Core.dll!Telerik.Windows.Data.RadListSource.SetSource(System.Collections.IEnumerable value = {System.Collections.ObjectModel.ObservableCollection<GovtPhone.ViewModels.Member>}) + 0x16 bytes 
  Telerik.Windows.Core.dll!Telerik.Windows.Data.RadListSource.SourceCollection.set(System.Collections.IEnumerable value = {System.Collections.ObjectModel.ObservableCollection<GovtPhone.ViewModels.Member>}) + 0x11 bytes 
  Telerik.Windows.Controls.Primitives.dll!Telerik.Windows.Controls.RadVirtualizingDataControl.OnItemsSourceChanged(System.Windows.DependencyObject sender = {Telerik.Windows.Controls.RadDataBoundListBox}, System.Windows.DependencyPropertyChangedEventArgs args = {System.Windows.DependencyPropertyChangedEventArgs}) + 0x22 bytes 
  System.Windows.dll!System.Windows.DependencyObject.RefreshExpression(System.Windows.DependencyProperty dp = {System.Windows.CustomDependencyProperty}) + 0xba bytes 
  System.Windows.dll!System.Windows.Data.BindingExpression.RefreshExpression() + 0xc bytes 
  System.Windows.dll!System.Windows.Data.BindingExpression.SendDataToTarget() + 0x2d bytes 
  System.Windows.dll!System.Windows.Data.BindingExpression.SourcePropertyChanged(System.Windows.PropertyPathListener sender = {System.Windows.PropertyPathListener}, System.Windows.PropertyPathChangedEventArgs args = {System.Windows.PropertyPathChangedEventArgs}) + 0xd bytes 
  System.Windows.dll!System.Windows.PropertyPathListener.RaisePropertyPathStepChanged(System.Windows.PropertyPathStep source = {System.Windows.PropertyAccessPathStep}) + 0x42 bytes 
  System.Windows.dll!System.Windows.PropertyAccessPathStep.RaisePropertyPathStepChanged(System.Windows.PropertyListener source = {System.Windows.CLRPropertyListener}) + 0xc bytes 
  System.Windows.dll!System.Windows.CLRPropertyListener.SourcePropertyChanged(object sender = {GovtPhone.ViewModels.MembersVM}, System.ComponentModel.PropertyChangedEventArgs args = {System.ComponentModel.PropertyChangedEventArgs}) + 0x3c bytes 
  System.Windows.dll!System.Windows.Data.WeakPropertyChangedListener.PropertyChangedCallback(object sender = {GovtPhone.ViewModels.MembersVM}, System.ComponentModel.PropertyChangedEventArgs args = {System.ComponentModel.PropertyChangedEventArgs}) + 0x25 bytes 
> GovtPhone.dll!GovtPhone.ViewModels.MembersVM.OnNotifyPropertyChanged(string p = "Members") Line 173 + 0x12 bytes C#
  GovtPhone.dll!GovtPhone.ViewModels.MembersVM.Members.set(System.Collections.ObjectModel.ObservableCollection<GovtPhone.ViewModels.Member> value = {System.Collections.ObjectModel.ObservableCollection<GovtPhone.ViewModels.Member>}) Line 110 + 0xb bytes C#
  GovtPhone.dll!GovtPhone.ViewModels.MembersVM.GetMembers.AnonymousMethod__0(object s = {System.Net.WebClient}, System.Net.OpenReadCompletedEventArgs e = {System.Net.OpenReadCompletedEventArgs}) Line 69 + 0x7 bytes C#
  System.dll!System.Net.WebClient.OnOpenReadCompleted(System.Net.OpenReadCompletedEventArgs e = {System.Net.OpenReadCompletedEventArgs}) + 0x15 bytes 
  System.dll!System.Net.WebClient.OpenReadOperationCompleted(object arg = {System.Net.OpenReadCompletedEventArgs}) + 0xc bytes 
  mscorlib.dll!System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo rtmi = {System.Reflection.RuntimeMethodInfo}, object obj = {System.Net.WebClient}, System.Reflection.BindingFlags invokeAttr = Default, System.Reflection.Binder binder = null, object parameters = {object[1]}, System.Globalization.CultureInfo culture = null, bool isBinderDefault = false, System.Reflection.Assembly caller = null, bool verifyAccess = true, ref System.Threading.StackCrawlMark stackMark = LookForMyCaller) 
  mscorlib.dll!System.Reflection.RuntimeMethodInfo.InternalInvoke(object obj = {System.Net.WebClient}, System.Reflection.BindingFlags invokeAttr = Default, System.Reflection.Binder binder = null, object[] parameters = {object[1]}, System.Globalization.CultureInfo culture = null, ref System.Threading.StackCrawlMark stackMark = LookForMyCaller) + 0x14e bytes 
  mscorlib.dll!System.Reflection.MethodBase.Invoke(object obj = {System.Net.WebClient}, object[] parameters = {object[1]}) + 0xa bytes 
  mscorlib.dll!System.Delegate.DynamicInvokeOne(object[] args = {object[1]}) + 0x98 bytes 
  mscorlib.dll!System.MulticastDelegate.DynamicInvokeImpl(object[] args = {object[1]}) + 0x8 bytes 
  mscorlib.dll!System.Delegate.DynamicInvoke(object[] args = {object[1]}) + 0x2 bytes 
  System.Windows.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0xc bytes 
  System.Windows.dll!System.Windows.Threading.Dispatcher.Dispatch(System.Windows.Threading.DispatcherPriority priority = 13) + 0x83 bytes 
  System.Windows.dll!System.Windows.Threading.Dispatcher.OnInvoke(object context = null) + 0x8 bytes 
  System.Windows.dll!System.Windows.Hosting.CallbackCookie.Invoke(object[] args = null) + 0x19 bytes 
  System.Windows.dll!System.Windows.Hosting.DelegateWrapper.InternalInvoke(object[] args = null) + 0x2 bytes 
  System.Windows.RuntimeHost.dll!System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(System.IntPtr pHandle = 24409144, int nParamCount = 0, System.Windows.Hosting.NativeMethods.ScriptParam[] pParams = {System.Windows.Hosting.NativeMethods.ScriptParam[0]}, ref System.Windows.Hosting.NativeMethods.ScriptParam pResult = {System.Windows.Hosting.NativeMethods.ScriptParam}) + 0x5e bytes 
  [Native to Managed Transition] 

This is the stack trace when I use the ListBox. (No exception is thrown when the ListBox is used.)
> GovtPhone.dll!GovtPhone.ViewModels.MembersVM.OnNotifyPropertyChanged(string p = "Members") Line 179 C#
  GovtPhone.dll!GovtPhone.ViewModels.MembersVM.Members.set(System.Collections.ObjectModel.ObservableCollection<GovtPhone.ViewModels.Member> value = {System.Collections.ObjectModel.ObservableCollection<GovtPhone.ViewModels.Member>}) Line 110 + 0xb bytes C#
  GovtPhone.dll!GovtPhone.ViewModels.MembersVM.GetMembers.AnonymousMethod__0(object s = {System.Net.WebClient}, System.Net.OpenReadCompletedEventArgs e = {System.Net.OpenReadCompletedEventArgs}) Line 69 + 0x7 bytes C#
  System.dll!System.Net.WebClient.OnOpenReadCompleted(System.Net.OpenReadCompletedEventArgs e = {System.Net.OpenReadCompletedEventArgs}) + 0x15 bytes 
  System.dll!System.Net.WebClient.OpenReadOperationCompleted(object arg = {System.Net.OpenReadCompletedEventArgs}) + 0xc bytes 
  mscorlib.dll!System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo rtmi = {System.Reflection.RuntimeMethodInfo}, object obj = {System.Net.WebClient}, System.Reflection.BindingFlags invokeAttr = Default, System.Reflection.Binder binder = null, object parameters = {object[1]}, System.Globalization.CultureInfo culture = null, bool isBinderDefault = false, System.Reflection.Assembly caller = null, bool verifyAccess = true, ref System.Threading.StackCrawlMark stackMark = LookForMyCaller) 
  mscorlib.dll!System.Reflection.RuntimeMethodInfo.InternalInvoke(object obj = {System.Net.WebClient}, System.Reflection.BindingFlags invokeAttr = Default, System.Reflection.Binder binder = null, object[] parameters = {object[1]}, System.Globalization.CultureInfo culture = null, ref System.Threading.StackCrawlMark stackMark = LookForMyCaller) + 0x14e bytes 
  mscorlib.dll!System.Reflection.MethodBase.Invoke(object obj = {System.Net.WebClient}, object[] parameters = {object[1]}) + 0xa bytes 
  mscorlib.dll!System.Delegate.DynamicInvokeOne(object[] args = {object[1]}) + 0x98 bytes 
  mscorlib.dll!System.MulticastDelegate.DynamicInvokeImpl(object[] args = {object[1]}) + 0x8 bytes 
  mscorlib.dll!System.Delegate.DynamicInvoke(object[] args = {object[1]}) + 0x2 bytes 
  System.Windows.dll!System.Windows.Threading.DispatcherOperation.Invoke() + 0xc bytes 
  System.Windows.dll!System.Windows.Threading.Dispatcher.Dispatch(System.Windows.Threading.DispatcherPriority priority = 13) + 0x83 bytes 
  System.Windows.dll!System.Windows.Threading.Dispatcher.OnInvoke(object context = null) + 0x8 bytes 
  System.Windows.dll!System.Windows.Hosting.CallbackCookie.Invoke(object[] args = null) + 0x19 bytes 
  System.Windows.dll!System.Windows.Hosting.DelegateWrapper.InternalInvoke(object[] args = null) + 0x2 bytes 
  System.Windows.RuntimeHost.dll!System.Windows.RuntimeHost.ManagedHost.InvokeDelegate(System.IntPtr pHandle = 17986616, int nParamCount = 0, System.Windows.Hosting.NativeMethods.ScriptParam[] pParams = {System.Windows.Hosting.NativeMethods.ScriptParam[0]}, ref System.Windows.Hosting.NativeMethods.ScriptParam pResult = {System.Windows.Hosting.NativeMethods.ScriptParam}) + 0x5e bytes 
  [Native to Managed Transition] 
0
Deyan
Telerik team
answered on 18 Feb 2011, 09:47 AM
Hi Charles,

Thanks for the requested details.

We now have been able to determine the reason for the undesired behavior. We will provide a fix for it in our upcoming Beta 2 release (scheduled for the beginning of March).

I have added 1000 Telerik points to your account for pointing out this issue to us.

Do not hesitate to get back to us in case of further questions.

Best wishes,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
0
Charles
Top achievements
Rank 2
answered on 18 Feb 2011, 02:06 PM
Thanks for your quick responses.

I'm just curious - could you give me any insight into what causes the problem? Also, is there any kind of suggested workaround? Finally, this problem seems to be isolated to a single one of my two or three projects where I am experimenting with the RadDataboundListbox. Any reason that it has manifested itself here and not in the others?
0
Accepted
Deyan
Telerik team
answered on 21 Feb 2011, 04:59 PM
Hi Charles,

Thanks for getting back to me.

The issue was related to the fact that you put the RadDataBoundListBox control in a grid column which has its width automatically calculated. That means that the column measures its children with infinite available width. This caused an exception in our control since we directly put the width passed to the control to the container items, i.e. we set an infinite width to a container which is invalid operation.

You can workaround this issue by simply setting an explicit width to the control for the time until we release our new version.

I hope this is helpful.

Do not hesitate to get back to us in case of further questions.

Best wishes,
Deyan
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
DataBoundListBox
Asked by
Charles
Top achievements
Rank 2
Answers by
Deyan
Telerik team
Charles
Top achievements
Rank 2
Share this question
or