Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
130
Not able to display RowNumbers in the XamDataGrid
posted

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

Parents
  • 17475
    Offline posted

    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.

    XamDataGridRecordNumber.zip
Reply Children
No Data