You are not logged in.
This forum has been archived and no longer accepts new user registrations. Please report your questions, problems, and feedback to the issue page of ReoGrid on GitHub. Thank you for your cooperation.
Pages: 1
Topic closed
The code below version 0.8.5, the well was operating at more than 1024 columns.
However, when accessing more than 1024 columns from the 0.8.8 version, RangeIntersectionException occurs.
Turned out to be HasIntersectedMergingRange method returns true.
How to fix?
ps. Thank you for having provided very good component.
const int rowCount = 100;
const int wordLength = 8;
const int colCount = 1024 * wordLength;
public Form1()
{
InitializeComponent();
this.Load += Form1_Load;
}
void Form1_Load(object sender, EventArgs e)
{
Init();
}
private void Init()
{
Stopwatch sw = Stopwatch.StartNew();
var sheet = this.grid.CurrentWorksheet;
sheet.Reset(rowCount, colCount);
ReoGridControlStyle rgcs = ReoGridControlStyle.DefaultControlStyle;
rgcs.SetColor(ReoGridControlColors.GridLine, Color.Black);
grid.ControlStyle = rgcs;
sheet.SetColumnsWidth(0, colCount, 8);
sheet.SetSettings(WorksheetSettings.View_ShowColumnHeader, false);
sheet.SetSettings(WorksheetSettings.Edit_Readonly, true);
sheet.SetSettings(WorksheetSettings.Edit_AutoAdjustRowHeight, false);
sheet.SetSettings(WorksheetSettings.Edit_AllowAdjustColumnWidth, false);
ReoGridStyleObject defaultColumnHeaderStyle = new unvell.ReoGrid.ReoGridStyleObject()
{
Flag = PlainStyleFlag.LineAll | PlainStyleFlag.HorizontalAlign,
BackColor = Color.FromArgb(240,248,255),
HAlign = ReoGridHorAlign.Center,
};
int headerText = 0;
for (int i = 0; i < colCount; i += wordLength)
{
var range = new ReoGridRange(0, i, 1, wordLength);
try
{
sheet.MergeRange(range);
}
catch (RangeIntersectionException ex)
{
//1024 over column RangeIntersectionException.....
Console.WriteLine(ex.Message);
}
sheet.SetCellData(0, i, (headerText++).ToString());
////style
//sheet.SetRangeStyle(range, defaultColumnHeaderStyle);
////border
//sheet.SetRangeBorders(range, BorderPositions.All, new unvell.ReoGrid.BorderStyle(Color.Black, BorderLineStyle.Solid));
}
sheet.FreezeToCell(1, 0);
sw.Stop();
Console.WriteLine(sw.Elapsed.ToString());
}
Offline
OK, let me check this problem!
Offline
This was a bug from 0.8.7. We have fixed this in current development version and tested it with your code, the result is:
We will make the next version available as soon as possible.
Offline
This problem has been fixed in 0.8.9.x versions. Please download it from:
Offline
Pages: 1
Topic closed