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
Is there any built in support for indent/outdent feature. Something like when I select some rows and I indent them they become children of the another row. And when I outdent them, they come back on same level. Making hierarchical data, with a plus sign that collapses and expands the inner children.
Offline
I think your case could be considered as two points:
Use built-in outline feature to collapse/expand rows
Use multiple cells to make indent-like visual effect
If you are using Excel, how do you want to implement it?
Welcome if you have any idea about this, they could be introduced into ReoGrid next version.
An example of outline:
After collapse:
Document about outline:
http://reogrid.net/document/group-and-outline/
Offline
Hi Jing,
Thanks for the response. Basically what Im trying to do is something more like in MS Project not Excel.
Following is what Im trying to implement (its and image of Ms project from the url. Note how the indentation of the text of cells of under same column is changed:
This is what I have implemented so far: few entries on same level,
When selected,
And the right indent button is clicked,
They become indented in the same column,
But this demo is made using, following and works only for one level, I need to increase or decrease indentation depending on which button is clicked:
Flag = PlainStyleFlag.HorizontalAlign,
HAlign = ReoGridHorAlign.Center,
If there is something like:
cell.indent.increase or decrease option in cell styles I may achieve what Im trying to do , waiting for a response soon,
Thanks and regards,
AB Zaman
Offline
The indent style(or as property) could be considered import into ReoGrid but I'm afraid we need more time to get it available.
Instead, if you want get it instantly how about to use multiple cells to make an indent-like sheet? For example:
Adjust the column to control the indent spaces:
Hide grid lines:
Code to do this:
sheet.SetSettings(WorksheetSettings.View_ShowGridLine, false);
Fill text:
If you want row lines, just add borders:
About how to add borders: http://reogrid.net/document/border
Also, if you don't like the row header, you could hide it:
Code to do this:
sheet.SetSettings(WorksheetSettings.View_ShowRowHeader, false);
If you would like to use indent rather than this solution, just tell me and give me a few weeks to finish and release it.
Last edited by Jingwood (2015-03-10 06:27:04)
Offline
Hi Jing,
Yes, it would be nice to use the actual indent and outdent functions instead. At the moment I'm trying to give the look and feel of the feature by adding spaces and outlines, which has added an over head of trimming and parsing data.
Also I'm having trouble with adding nested outlines. For instance see the following image:
I have indented three rows under the forth row (from below), now I want to indent the last two rows under the third row (keeping the first outline, which is already there), but i get the outline intersected exception. The same code works if I only add the second last row.
can you help?
Offline
OK, I will add this feature as soon as possible. And the OutlineIntersectedException was a bug and now I've fixed it, next version would be available within 2 weeks.
Offline
Awaiting, thanks!
Offline
There is the preview download of next version, indent style supported from this 0.8.8.5 version:
http://reogrid.net/preview-download/
The cell indent could be set by using Style.Indent, for example:
var cell = worksheet.Cells["B3"];
cell.Style.Indent = 2;
cell.Data = "Hello";
Result:
ReoGrid also support to change indent size for a worksheet:
worksheet.IndentSize = 15; // 1 indent = 15 pixels
Last edited by Jingwood (2015-03-24 15:14:06)
Offline
Please continue reply on this topic: http://forum.reogrid.net/viewtopic.php?id=109
Offline
Pages: 1
Topic closed