From 8ee0eddd1839efe94c37cce1f9658f08b6cecb35 Mon Sep 17 00:00:00 2001 From: Rich Date: Wed, 12 Nov 2014 01:35:20 +0000 Subject: [PATCH] Added code to assure correct user was saved in Grid table when changes are made to a grid Modified code to prevent corruption of grid data when removing a column in a grid --- PROMS/Volian.Controls.Library/GridItem.cs | 1 + PROMS/Volian.Controls.Library/VlnFlexGrid.cs | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PROMS/Volian.Controls.Library/GridItem.cs b/PROMS/Volian.Controls.Library/GridItem.cs index 2675d188..085b275b 100644 --- a/PROMS/Volian.Controls.Library/GridItem.cs +++ b/PROMS/Volian.Controls.Library/GridItem.cs @@ -649,6 +649,7 @@ namespace Volian.Controls.Library // CompareXML(itm.MyContent.MyGrid.Data, xml); itm.MyContent.MyGrid.Data = xml; itm.MyContent.MyGrid.DTS = DateTime.Now; + itm.MyContent.MyGrid.UserID = Volian.Base.Library.VlnSettings.UserID; //} // if this is the initial save of an ro table, then the 'DoLinkForRoTable' will // create the usage for it. this code gets run on modify of the ro table and also diff --git a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs index 8730c792..b98ea2ac 100644 --- a/PROMS/Volian.Controls.Library/VlnFlexGrid.cs +++ b/PROMS/Volian.Controls.Library/VlnFlexGrid.cs @@ -3116,8 +3116,8 @@ namespace Volian.Controls.Library // r2 is last row (or in merge range containing last row) // r1 is first row or r1-m (m is in merge range) is first row // we can remove columns c1 through c2 - - int idx = this.MergedRanges.IndexOf(cr.r2, cr.c2); + int idx = this.MergedRanges.IndexOf(cr); + //int idx = this.MergedRanges.IndexOf(cr.r2, cr.c2); CellRange mr = new CellRange(); if (idx > -1) mr = this.MergedRanges[idx]; if (cr.r2 == lastRow || idx > -1 && mr.r2 == lastRow)//RowIsInMergeRange(grd,cr.r2))