Row deletion after sorting |
Post Reply |
Author | |
Benit
Newbie Joined: 14 March 2011 Location: India Status: Offline Points: 8 |
Post Options
Thanks(0)
Posted: 28 March 2013 at 1:51am |
I have a grid containing "n" records, the grid has a property to sort , add and delete rows .
When user add a row and then sort it the sort order is reflected visibly . But when i am trying to delete after sorting, the focussed row is not getting deleted. Deletion occurs for the row which was selected before sorting was deleted. EXAMPLE: row before sorting is 1,2,3,4,5 row after sorting is 5,3,1,2,4 Now if i want to delete row 5 it is till deleting ROW 1. Can any one tell me why this happens? Do i need to set any thing before deletion if records has been sorted? |
|
Benit
Newbie Joined: 14 March 2011 Location: India Status: Offline Points: 8 |
Post Options
Thanks(0)
|
CXTPReportRow *ptrSelRow = NULL; CXTPReportRecords *pAllRecords = NULL; ptrSelRow = GetFocusedRow(); int nSelRow = -1; if(ptrSelRow != NULL) { nSelRow = ptrSelRow->GetIndex(); pAllRecords = GetRecords(); pAllRecords->RemoveAt(nSelRow); Populate(); } Is there any thing to add up for gird after sorting |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |