Hello I want the help for fixing position of FieldLayoutSettings.
Means I don't want to scroll it with horizontal scrollbar.
As Field is having the FixedLocation property,
What is the property for FieldLayoutSettings?
Hello Pratibha,
In order to fix all fields of a specific FieldLayout, you can set the FixedLocation property of every field to the desired value.
foreach (Field field in dataGrid.DefaultFieldLayout.Fields){ field.FixedLocation = FixedFieldLocation.FixedToFarEdge;}
The FieldLayoutSettings property of the XamDataGrid is a property that sets general settings for all of it's FieldLayouts.
Would you please provide me with more detailed information on what you are referring to by saying "fix the location of FieldLayoutSettings"? It would be great if you could provide me with images that illustrate the desired behavior.
If you have any questions, please let me know.
Hello Thanks for the reply.
Yes the FixedFieldLocation.FixedToFarEdge that I already used.
But I want fix the below control,its adding the expand button(using SurveyEditorDataRecordPresenterStyle) for row in first column and I just don't want to scroll it(expand button) it with scrollbar.
Below is the code which I am using
<igDP:FieldLayoutSettings AddNewRecordLocation="OnBottom" RecordSelectorLocation="None" ExpansionIndicatorDisplayMode="Never"
SelectionTypeRecord="Single"
AllowAddNew="False"
AllowDelete="False"
AutoGenerateFields="False"
AllowFieldMoving="No" FilterUIType="LabelIcons"
DataRecordPresenterStyle ="{StaticResource SurveyEditorDataRecordPresenterStyle}"
>
</igDP:FieldLayoutSettings>
</ULSSControls:ULSSXamDataGrid.FieldLayoutSettings>
According to the description you have provided, I presume you would like to fix the RecordSelector along with the ExpansionIndicator (for hierarchical data), so they do not get scrolled out of view when scrolling horizontally in the XamDataGrid.
An approach I can suggest you in order to achieve the above functionality is to collapse the default HeaderPrefixArea and RecordSelector. This way you can create an unbound Field for both the parent and the child layout (every child layout would require an unbound Field as well in order to preserve the proper alignment of the records).After creating the unbound fields, you can create a CellValuePresenterStyle for them by including the RecordSelector element as a ControlTemplate for the parent layout. This way when these fields get fixed, you should be able to achieve the desired functionality.For more detailed information, you can take a look at the following thread.
You can always submit a new product idea for fixing the RecordSelector at http://ideas.infragistics.com.I have attached a sample application that uses the approach from above.
Hello,
Thanks for the help.
But I am using DataRecordPresenter and in solution which you provided,its having CellValuePresenter.
Can you provide me a solution with DataRecordPresenter instead ofCellValuePresenter.?
In order to use a style for the DataRecordPresenter to achieve the same functionality, an approach I can suggest you is to handle the Loaded event of the DataRecordPresenter by hooking for it with an EventSetter. This way you can explicitly get the CellValuePresenter that represents our record selector from the DataRecordPresenter and set it's respective style.Since we are using the cells of the unbound fields themselves to display the fixed record selectors (and expansion indicators), the CellValuePresenters should be retemplated in order for them to have the desired look, which cannot exclude the use of their styles.
I have attached a sample that uses the approach from above.