Hi
How could i make the header multi line?
Hi,
This link explains how to define Header Column layout.
http://help.infragistics.com/NetAdvantage/WPF/2012.1/CLR4.0/?page=xamDataGrid_Changing_the_Default_Column_and_Row_Definitions.html
In this link Krasimir has a sample where he defines a LabelPresenterStyle and ContentTemplate in code in order to modify the layout of the Header column.
http://ko.infragistics.com/community/forums/t/70728.aspx
You can do the same by creating a LabelPresenter style in xaml, adding a ContentTemplate with your requirements.
There would certainly be other options if I knew more about what you were trying to accomplish.
If you can me more specific I will try to give you other suggestions.
Hi , Maraianne ,
i have 3 questions regarding xamdatagrid and its column headers.
i ) i have to write generalized function to parse all xamdatagrids designed in different layouts to export it on csv file format, now i am facing problems with grids which have multiline headers or some extra bind field in view . what actually i am looking for is the property / object of xamdatagrid which create its visual layout.usually i am getting two layouts and for accessing fields i have to hard code the index of any of two.How ever , some additonal fields are rendering some times at index 0 and sometime at 1 which causing incorrect depiction of xamdatagrid in csv file.plz help to figure out the collection which is reponsible for visual rendering of grid
ii ) when i applied field chooser to my grid , it renders all properties of source object collection in its chekboxes list which are not desired to be viewed,how can i render only thos proerties in field chooser which are being rendered in xamdatagrid
iii ) field chooser reder a checkbox field for th column which doent entited with any titl/name.Actually i have palced tht column for notification image for in front of every record bt i dont want it this column to appear in field chooser
Looking forward and thank you in advance !
thanks alot for response Marainne
i think i didnt elaborate my fistr query well,
i am getting numerous fieldlayouts of xamdatagrid , lets say i have three layouts, one contains source properties, 2nd contains one or two flag properties and third one have all those columns which are shown in grid which contain grids as well as some addtional some addtional fields define in xaml .
My 2nd grid in another view is bringing 2 layouts ,one have source while other have source + some addtional fields define in xaml and i want to get the 2nd layout as it is actual depiction of my xamdatagrid
as i am making a generalized method to parse the grids, its impossible for me to decide whch is the most appropirate layout to be parsed at run time.can u help me to resolve this issue?
Let me know if there are any further questions on this issue.
@ mheusser
This is because you have a very basic, stripped down control template for the LabelPresenter. Themes make heavy use of triggers to react to certain events such as MouseOver. This will depend on the theme you are using as well. What I recommend you do is look at the default styles folder for the DataPresenter and check out the LabelPresenter style that is in there. You'll want to modify it a bit to add in the TextBlock with TextWrapping. The location of the default styles is C:\Program Files (x86)\Infragistics\NetAdvantage 2012.1\WPF\DefaultStyles\DataPresenter. Pick the file that has the theme you want.
@ sam
Without some criteria to search by it is going to be impossible to know which field layout you want. You need to have some criteria to perform any kind of search. Is there any such criteria that you can use to determine which field layout you need? Things such as the field layout with the most columns. Maybe you could give your FieldLayouts a key at design time and then just search for that key at run time like so:
FieldLayout myFieldLayout = xamDataGrid1.FieldLayouts["MyFieldLayoutKey"];