Hello,
I’ve added 2 new buttons to a custom grid. An up arrow and a down arrow. I would like to be able to move row items up and down the grid. The sequence controls the order in which the sites/warehouses are checked in my code.

A screen shot is above. The arrows button are highlighted. I have a field called ‘OrderNumber’ which stores the sequence of the items.
The RETAIL site is selected in the grid and I will press the Up Arrow button. ..

After pressing the up arrow button, my code has changed the values in the Order Number field, and the Save button is now available. But the grid has not been refreshed. If I click on the refresh button nothing happens. If I click on the Save button….

...the page and data is refreshed and the grid is reordered.
The view which provides data to the grid looks like this
public SelectFrom<PinnSitePriority> .Where<PinnSitePriority.siteid.IsEqual<INSite.siteID.FromCurrent>>.OrderBy<PinnSitePriority.orderNumber.Asc>
.View viewPinnSitePriority;
private void MoveRowByArrow(bool moveUp)
{
SequencingRows = true;
PinnSitePriority pinnSitePriority = viewPinnSitePriority.Current;
if (moveUp == true)
{
List<PinnSitePriority> l = viewPinnSitePriority.Cache.Cached.RowCast<PinnSitePriority>().ToList();
//code to reorder the items in the list - not shown to save space
//code to update the items in the cache
int? origNo = pinnSitePriority.OrderNumber;
pinnSitePriority.OrderNumber = p.OrderNumber;
p.OrderNumber = origNo;
//code to update the cache
viewPinnSitePriority.Cache.Update(pinnSitePriority);
viewPinnSitePriority.Cache.Update(p);
//attempts to refresh the grid
viewPinnSitePriority.Select();
viewPinnSitePriority.View.RequestRefresh();
}
else
{// moveDown code}
}
The code above is fired from the up/down action buttons. The idea is to change the numbers in the OrderNumber fields, update the cache and then update the grid with the results. I had hoped that calling RequestRefresh would refresh the view, including the OrderBy section but this doesn’t seem to be the case.
Does anyone know how I can force the grid to update to reflect the updated ordering of the items in the cache.
Thanks
Steve