Hi,
Still evaluating the controls but pretty much convinced folks to buy. last thing I need to to is variable numbers of columns at Run-Time. I have this class:
public class RawDataSetDto<T> : IList<T>
{
public ReadOnlyCollection<T> Rows { get { return new ReadOnlyCollection<T>(_rows); } }
public ReadOnlyCollection<string> Headers { get { return new ReadOnlyCollection<string>(_headers); } }
}
I just want the grid to create a column for each entry in Headers and then show the data in the Rows collection. Simply cannot figure out how to bind the Field creation in XAML.
My Grid Declaration is:
<ig:XamDataGrid DataContext="{Binding MyDataSet}" DataSource="{Binding Rows}" Grid.RowSpan="1" > <ig:FieldLayoutSettings AutoGenerateFields="False" /> </ig:XamDataGrid>
MyDataSet is an instance of RawDataSetDto<RawDataRowDto>
Hello,
Thank you for your feedback. I am glad that you resolved your issue and I believe that other community members may benefit from this as well.
Thanks again.
Hi Chap,
yeah, I nailed that problem and have convinced the folks I'm contracting for to buy the ultimate collection!!
NICE!
Cheers,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Thank you for your post. I have been looking into it and I suggest you see this blog:
http://blogs.infragistics.com/blogs/petar_monov/archive/2011/05/13/how-to-define-fieldlayouts-how-fieldlyouts-are-mapped.aspx
from where you can get a better understanding of how the Field’s mapping in XamDataGrid works. Also you can add Fields during run-time from code behind. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.