ReoGrid Forum

Fast and powerful .NET Spreadsheet Component

You are not logged in.

Announcement

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.

https://github.com/unvell/ReoGrid/issues

#1 2015-03-06 03:16:23

AB Zaman
Member
Registered: 2015-02-23
Posts: 14

Indent/Outdent - Presenting hierarchial data

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

#2 2015-03-06 07:39:00

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Indent/Outdent - Presenting hierarchial data

I think your case could be considered as two points:

  1. Use built-in outline feature to collapse/expand rows

  2. 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:
208.png

After collapse:
209.png

Document about outline:
http://reogrid.net/document/group-and-outline/

Offline

#3 2015-03-08 17:40:01

AB Zaman
Member
Registered: 2015-02-23
Posts: 14

Re: Indent/Outdent - Presenting hierarchial data

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:
spec img1

This is what I have implemented so far: few entries on same level,
current1 img2

When selected,
current1 img3

And the right indent button is clicked,
current1 img4

They become indented in the same column,
current1 img5

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 smile, waiting for a response soon,

Thanks and regards,
AB Zaman

Offline

#4 2015-03-10 06:18:52

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Indent/Outdent - Presenting hierarchial data

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:
210.png

Hide grid lines:
211.png
Code to do this:

sheet.SetSettings(WorksheetSettings.View_ShowGridLine, false);

Fill text:
212.png

If you want row lines, just add borders:
213.png
About how to add borders: http://reogrid.net/document/border

Also, if you don't like the row header, you could hide it:
214.png
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

#5 2015-03-12 06:36:17

AB Zaman
Member
Registered: 2015-02-23
Posts: 14

Re: Indent/Outdent - Presenting hierarchial data

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:

indent1 exception

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.

indent works

can you help?

Offline

#6 2015-03-12 08:54:03

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Indent/Outdent - Presenting hierarchial data

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

#7 2015-03-18 04:23:03

AB Zaman
Member
Registered: 2015-02-23
Posts: 14

Re: Indent/Outdent - Presenting hierarchial data

Awaiting, thanks!

Offline

#8 2015-03-24 15:11:58

Jingwood
Moderator
From: jing at reogrid.net
Registered: 2014-06-03
Posts: 615

Re: Indent/Outdent - Presenting hierarchial data

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:

217.png

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

#9 2015-03-30 02:32:08

unvell
Administrator
Registered: 2014-06-03
Posts: 20
Website

Re: Indent/Outdent - Presenting hierarchial data

Please continue reply on this topic: http://forum.reogrid.net/viewtopic.php?id=109

Offline

Board footer

Powered by FluxBB