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.
Hi,
im trying to remove range styles, but nothing changes. Even if i delete rows/cols the style will be there after adding new rows/cols.
I tried with different style flags.
-Tom
Offline
Hi, Could you give some pieces of code? I've tested this that works fine.
var range = new ReoGridRange("B2:D4");
// set styles
sheet.SetRangeStyle(range, new ReoGridStyleObject
{
Flag = PlainStyleFlag.BackColor,
BackColor = Color.SkyBlue,
});
// remove styles
sheet.RemoveRangeStyle(range, PlainStyleFlag.BackColor);
Offline
Well,
now i know my problem. I thought i can remove all the styles with one call to the whole grid, means i do not specify the same range while trying to remove the style(s).
In example
var range = new ReoGridRange("B2:D4");
var rangeAll = new ReoGridRange("A1:D4");
// set styles
sheet.SetRangeStyle(range, new ReoGridStyleObject
{
Flag = PlainStyleFlag.BackColor,
BackColor = Color.SkyBlue,
});
// remove styles
sheet.RemoveRangeStyle(rangeAll , PlainStyleFlag.BackColor);
Is there any possibility to remove all styles at once?
Offline
Try this:
// remove all styles from whole grid
sheet.RemoveRangeStyle(ReoGridRange.EntireRange, PlainStyleFlag.All);
Offline
Well,
i tried it, but it seems there are some problems evaluating all ranges. If i set a style on a ranges via a row/column(selectionRange), the range will not loose their style. The same thing happes if i have f.i. a range with an image as part of a cell.
Offline
I hope I can help you, however if you could provide some code that shows how to reappear the issue, that will be helpful.
Offline