We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

stacked columns

hello,

i would like to ask if can send a samplle of this(in case it's possible):

i need a grid that it's a timeline. the first 2 columns is the employee and his occupation. there freezed columns.

there another 5 colmns that represents days in the timeline.
i need that each could be divided to 3 columns.
i tried to use the GridDataControl and and use the stacked headers and cell spans to support the options of divided or not.
i don't want that the present the headrs, only the stack headers.

i attached sample in word ducument, the column that not divded supposed to have rows.

any ideas how to implement that will be very helpful.

best regards







sample_aaeafb5d.rar

1 Reply

KA Kamalakannan A Syncfusion Team July 12, 2010 07:56 PM UTC

Hi
You can have a glance on the following links to achieve your requirements.

Staked headers

This in-built feature allows you to have additional header rows that span across grid columns.
You can group desired columns under each header row. These stacked header rows can be rearranged
by a simple drag-and-drop action.

By using this stacked header you can achieve Timeline grid.

Please refer the following sample for your reference.

VirtualModeAndStackedHeader-1738488116.zip


Covered Cells

Covered cells allow you to treat a rectangular collection of cells as a single cell. The properties of a covered
range are determined by the properties of the cell in the upper-left corner of the range.

You can use covered cells to implement the non-divided columns as in your samples.

Please refer this following location for samples installed in your machine.

\WPF\Grid.WPF\Samples\3.5\WindowsSamples\Appearance\Covered Cell Demo\CS

Help Documents

http://help.syncfusion.com/ug_82/WPFUI_Grid/QueryCoveredRange.html

http://help.syncfusion.com/ug_82/WPFUI_Grid/CoveredRanges.html


QueryCellinfo

This Querycellinfo event is used to customize the cells in the grid control.


You can handle this event as follows


this.dataGrid.Model.QueryCellInfo += new GridQueryCellInfoEventHandler(Model_QueryCellInfo);


void Model_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
GridDataTableStyleInfoIdentity style = e.Style.CellIdentity as GridDataTableStyleInfoIdentity;
if (e.Cell.ColumnIndex == 3 && style.TableCellType == GridDataTableCellType.UnboundColumnCell)
{
var value = this.dataGrid.Model.Table.GetUnboundValue(e.Cell.RowIndex, e.Cell.ColumnIndex);
if (value != null)
{
double val = double.Parse(value.ToString());
if (val > 500)
e.Style.Foreground = Brushes.Red;
}
}
}

Help Documents

http://help.syncfusion.com/ug_82/WPFUI_Grid/QueryCellInfoAndCommitCellInfo.html


You can achieve your requirements by using the above features.

Please let us know if you need any more information.


Thanks
Kamalakannan

Loader.
Live Chat Icon For mobile
Up arrow icon