Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
90
Grid not showing List<string> property of a class.
posted

Hi ,

I have the below view

<igDP:XamDataGrid BindToSampleData="False"  x:Name="dgUserAttributeList" GroupByAreaLocation="None"

       DataSource="{Binding UserAttributes}"  

                                BorderThickness="1" BorderBrush="{DynamicResource {x:Static SystemColors.ActiveBorderBrushKey}}"

                                ActiveDataItem="{Binding SelectedElement, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"

                                    ScrollingMode="Immediate" Margin="0,5,0,0">

 

                                <igDP:XamDataGrid.FieldLayoutSettings>

                                    <igDP:FieldLayoutSettings AllowAddNew="False" AllowDelete="False" AutoGenerateFields="False" />

                                </igDP:XamDataGrid.FieldLayoutSettings>

                                <igDP:XamDataGrid.FieldSettings>

                                    <igDP:FieldSettings AllowEdit="False" 

CellClickAction="SelectRecord" 

AllowGroupBy="False" AllowHiding="Never"

AllowRecordFiltering="False" AllowSummaries="False" />

                                </igDP:XamDataGrid.FieldSettings>

                                <igDP:XamDataGrid.ViewSettings>

                                    <igDP:GridViewSettings />

                                </igDP:XamDataGrid.ViewSettings>

                                <igDP:XamDataGrid.FieldLayouts>

                                    <igDP:FieldLayout>

                                        <igDP:Field Name="Name" Label="Name" Width="Auto" />                                      

                                        <igDP:Field Name="values" Label="DisplayValue" Width="*" />

 

                                </igDP:XamDataGrid.FieldLayouts>

                            </igDP:XamDataGrid>

 

 

i have a class  type as 

public class AttributeInfo{

 public String Name { get { return this._Name; }

            set

            {

                if (this._Name != value)

                {

                    this._Name = value;

                    NotifyPropertyChanged("Name");

                }

            }

        }

       public String DisplayValue { get { return this._DisplayValue; }

            set

            {

                if (_DisplayValue!=value)

                {

                    _DisplayValue = value;

                    NotifyPropertyChanged("DisplayValue");

                }

            }

        }

 

        public List<string> values {

            get {return this._values; }

            set {

                if (_values != value)

                {

                    _values = value;

                    NotifyPropertyChanged("values");

                }

 

            }

        }

}

 

In the view model i   have created an observable collection property  of type AttributeInfo(Above class).

 public ObservableCollection<AttributeInfo> UserAttributes

        {

            get { return _UserAttributes; }

            set

            {

                _UserAttributes = value;

                RaisePropertyChanged("UserAttributes");

            }

 

        }.

 

 

when i am trying to bind to xam grid   only the names are showing but the   values with a list is not showing up..

 

Please suggest.

 

 

 

  • 138253
    Offline posted

    Hello,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking into your post and I can suggest you see this forum thread:

     

    http://ko.infragistics.com/community/forums/p/34846/197255.aspx

     

    where it is explained how to achieve the result you want.

     

    Feel free to write me if you have further questions.