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.
Unfortunately, activation email could not send to your email. Please try again.

How can i create stackedheader and it's columns from code?

Thread ID:

Created:

Updated:

Platform:

Replies:

115537 Jan 21,2014 10:36 AM Jan 24,2014 04:15 AM WPF 1
loading
Tags: GridControl
omigis
Asked On January 21, 2014 10:36 AM

Hello, 

We are in trial period, and i was wondering how can i create stackedheader and it's columns at runtime?

Seems i can't find that piece of code anywhere!

Thank in advance!

Shakul Hameed M [Syncfusion]
Replied On January 24, 2014 04:15 AM

Hi omigis,

 

Thanks for contacting Syncfusion Support.

 

We have analyzed your query and we can able to achieve your requirement by using the following code snippet.

 

Code Snippet: [C#]

private void Button_Click(object sender, RoutedEventArgs e)

        {

            GridDataStackedHeaderRow row = new GridDataStackedHeaderRow();

            row.Name = "Row3";

            GridDataStackedHeaderColumn column = new GridDataStackedHeaderColumn();

            column.HeaderText = "Stacked Header";

            column.ColumnSpan = 6;

            row.Columns.Add(column);

            this.SyncGrid.StackedHeaderRows.Add(row);

            this.SyncGrid.Model.View.Refresh();

        }

 

We have prepared the sample based on your requirement and please find the attached sample.

 

Please let us know if this solution helps you.

 

Thanks,

Shakul Hameed



StackedHeaderRunTime_19bdf309.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;