Hi. I need some help please.I'm new to Infragistics.I'm trying to add columns in xamdatagrid, but it doesn't work..<igDP:XamDataGrid Name="xamDataGrid1" BindToSampleData="False"> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout> <igDP:Field Label="Первый" Name="nFirst" Width="40" /> <igDP:Field Column="1" IsPrimary="True" Label="Второй" Name="nSecond" Width="50" /> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid>when i compile my program, in xamdatagrid is nothing..But if I write "<igDP:XamDataGrid Name="xamDataGrid1" BindToSampleData="True">", in xamdatagrid i can see my columns and columns, which given for example..please, help me.p.s. sorry for my english
Hello,
I have been looking into you issue and can suggest reading through these links from our online documentation which should clarify things for you:
http://help.infragistics.com/Help/NetAdvantage/WPF/2010.3/CLR4.0/html/xamDataPresenter_Define_a_Field_Layout.html
http://help.infragistics.com/Help/NetAdvantage/WPF/2010.3/CLR4.0/html/xamDataPresenter_Manually_Assigning_a_Field_Layout_to_xamDataPresenter.html
Another thing you should have in mind is that you have to set a DataSource of your XamDataGrid in order to get it to map to a FieldLayout (This is why the BindToSampleData works on your side).
Please let me know if you require any further clarification on the matter.
Sincerely,
Petar Monov
Developer Support Engineer
Infragistics Bulgaria
www.infragistics.com/support
I tried to add in xamDataGrid and xamDataPresenter
<igDP:XamDataPresenter.FieldLayoutSettings> <igDP:FieldLayoutSettings AutoGenerateFields="False" /> </igDP:XamDataPresenter.FieldLayoutSettings>but nothing changed..i made how in samples, which you gave me.. but nothing help me..i tried to set a DataSource in different ways - the same result..i don't need to read the data from xml file.. Customer should type information in DataGrid..WindowsForms has usual DataGrid, but I have to do in WPF this issue..it should look like this:
Hello ,
I think I might have misunderstood you. Just to make sure we are on the same side – are you trying to have an empty grid and the allow the users to fill it up?
Looking forward to your reply.
Hi Benjamin,
I am really glad I could help you out. If you don’t have any additional questions regarding this, please verify the thread as answered so it helps other users as well.
Thanks in advance.
Hi, Petar,Thank you very much. I did everything that I wanted by your example.Regards Benjamin.
I have been further looking into your issue and have created a sample project showing how you can do this. Please run it and let me know if this is what you needed. Let me know if you require any furher assistance on the matter.
Regards Petar.
Hello,Yes, you understood me correctly.
When users fill up the grid, data record in database. Then, the grid, based on database, fills up or remains empty.Sincerely, Benjamin.