I have my custom grid which is being inherited by xamDataGrid. Below is the code:
<my:CustomGrid x:Name="uxSampleGrid" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" GroupByAreaLocation="None" Height="120" AutoFit="True" DataSource="{Binding TransactionCollection}"
<my:CustomGrid.FieldSettings> <igDP:FieldSettings AllowEdit="False" CellClickAction="SelectRecord" /> </my:CustomGrid.FieldSettings> <my:CustomGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AllowDelete="False" AllowAddNew="False" TextBlock.TextAlignment="Center" HighlightAlternateRecords="True"AutoGenerateFields="False" SelectionTypeCell="None" SelectionTypeField="None" SelectionTypeRecord="Extended" RecordSelectorNumberType="DataItemIndex" /> </my:CustomGrid.FieldLayoutSettings>
<my:CustomGrid.FieldLayouts> <igDP:FieldLayout> <igDP:FieldLayout.Settings> <igDP:FieldLayoutSettings AllowFieldMoving="No" RecordFilterScope="AllRecords" ReevaluateFiltersOnDataChange="True" /> </igDP:FieldLayout.Settings> <igDP:FieldLayout.Fields>
<!--DISPLAYING MY CUSTOM COLUMNS-->
<igDP:Field BindingType="UseAlternateBinding" AlternateBinding="{Binding SequenceNo}" Name="SequenceNo" Label="Txn Seq #" > <igDP:Field.Settings> <igDP:FieldSettings LabelWidth="80" CellWidth="80" AllowEdit="False"/> </igDP:Field.Settings> </igDP:Field>
<igDP:FieldLayout.Fields />
<my:CustomGrid.FieldLayouts />
<my:CustomGrid />
I am looking to display the first column as RowNumber and then other columns are populated from my datasource bound to grid. But I can only see data for my columns from datasource and NOT THE ROWNUMBER.
Please let me know what can be the issue.
Thanks,
Abdi
Hello Mara,
I want to do the same Thing...
Adding a row indicator to the left. There seems to be something wrong wit the zip file CustomGrid.cs is an empty class. Cannot run the sample Project.
Hello Abdi,
I have put together a sample project using the settings from the provided code snippets. By setting the RecordSelectorNumberType="DataItemIndex" the record indexes are displayed in the record selectors when building against Infragistics WPF version 16.2.2045.
Please test with the attached project if the indexes are shown your side and feel free to modify the project if it does not illustrate your scenario. Thank you.