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
655
Dynamic columns with binding and conditional parameters
posted

Here is the scenario:

1. I am loading data from a stream
2. I am not using any predefined classes
3. I need to dynamically fill a datagrid based on the stream
4. based on properties in the stream I need to specify certain column properties and specify binding for the column

Currently I can accomplish this with a standard Silverlight DataGrid with the following:

private DataGridColumn CreateColumn(string property)
        {
            {
                return new DataGridTextColumn()
                {
                    CanUserSort = true,
                    Header = property,
                    SortMemberPath = property,
                    IsReadOnly = true,


                    Binding = new Binding("Data")
                    {
                        Converter = myConverter,
                        ConverterParameter = property
                    }
                };
            }
        }

 

I can specify the binding information here with a converter and param.

 

Is it possible to accomplish the above using the Xam Grid? How can I specify column binding with infragistics? I need to be able to specify the column type, binding, and other column parameters.

 

Thanks