Hello,
I'm using a xamdatagrid and I need to have numbering on the records. does the xamdatagrid have a feature to automatically add row numbering to the grid. Since now the numbering is a field in the data source and I have some problems related to this way of implementing the numbering of the records.
Thank you
I have contacted with our Product Management team and they said that they will put this into the backlog and they will try to add this feature in version 13.2.
I would like this feature as well. Please inform me as well when the feature is ready.
Hi Mindesoft,
Thanks for quick reply.
I have tried other events as well like RecordsInViewChanged or sorted event handler but the problem persists. Whenever we change the column for sorting( i.e.if data is sorted on col1 desc initially and if I change sorting on col3 asc by clicking column header then the row index doesn't appear proper. Now if I continue to Col3 desc then row index appears proper. Not sure why isn't is appear in correct order when column is changed.
I get same problem when I add even handler for the code provided at below post.
http://news.infragistics.com/forums/t/40391.aspx
I think I am missing something but unable to figure it ut.
Could you please provide some more input on how to do it on Dispathcer thread.
Or a sample application where it works for you.
Thanks in advance for your help.
maybe you should try to put increment code in dispatcher thread? or try to find another event (record/view changed or smth like that). I have not any troubles with numbering when I sort, filter, hide or expand data in my datagrid.
Hi,
I have implemented solution mentioned above. I also added this.DummeyValue++; in the Sorting event handler as follows.
private void XamDataGrid1_Sorting(object sender, Infragistics.Windows.DataPresenter.Events.SortingEventArgs e){
this.DummyValue++;
}
By doing this the grid shows proper row index for when data gets loaded into it. Howevere I am not getting proper row index when sorting is changed.
Here is detailed scenario:
In my xaml code I have set FieldLayout as follows to sort data of Column1 in Descending order when grid initializes.
<igDP:XamDataGrid.FieldLayouts>
<igDP:FieldLayout>
<igDP:FieldLayout.SortedFields>
<igDP:FieldSortDescription IsGroupBy="False" Direction="Descending" FieldName="Column1" />
</igDP:FieldLayout.SortedFields>
</igDP:FieldLayout>
</igDP:XamDataGrid.FieldLayouts>
The RowIndex gets displayed properly when data gets loaded in grid for the first time. Now if I change the sort order for 1st column then also the rowIndex are shown properly. However if I perform Sorting on other column say column 3 then the row Index are not shown proper. Now if I change the sorting order for column3 then the row inderx are shown proper.
To Summerize the problem, when sorting is getting applied to a different column than the exsiting sorted column then RowIndex is not displayed properly.
Could you please suggest solution so that correct row indexes are shown even though Sorting is applied on any column of Grid.