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
This commit is contained in:
Rich
2014-11-12 01:35:20 +00:00
parent 1be86ef960
commit 8ee0eddd18
2 changed files with 3 additions and 2 deletions

View File

@@ -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))