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.

Covered ranges in databound grid

Thread ID:

Created:

Updated:

Platform:

Replies:

64059 Jul 13,2007 06:17 AM Jul 19,2007 02:20 PM Windows Forms 3
loading
Tags: GridControl
Anand
Asked On July 13, 2007 06:17 AM

Hi Haneef,
We are using the data bound grid and we need the covered ranges to show header inforamtion. Pls see the sample.Many Thanks in advance.

Covered Ranges in DataBoundGrid.zip

haneefm [Syncfusion]
Replied On July 13, 2007 11:25 AM

Hi Anand,

The GDBGMultiHeader broswer sample shows you how to have multiple row and / or column headers in your GridDataBoundGrid as well as additional unbound rows or columns. It has a couple of fixed rows at the top of the grid that show a variety of controls such as comboboxes, dropdownlists, checkboxes and buttons. It is also an unbound checkbox column which, is on the left side of the grid that affects the display of the values which, are in that row.

Sample : C:\Documents and Settings\haneefm\My Documents\Syncfusion\EssentialStudio\5.1.1.0\Windows\Grid.Windows\Samples\2.0\DataBound\GDBGMultiHeader\cs

Best regards,
Haneef

Anand
Replied On July 19, 2007 08:47 AM

Hi Haneef,
Thanks a lot for the sample. Things are working fine for me except that the extra row header is coming as second row header. I want it to be above the datasource column headers i.e at the zeroth row.
Thanks a lot in advance.

haneefm [Syncfusion]
Replied On July 19, 2007 02:20 PM

Hi Anand,

By default, Extra header row placed below the column header row. One way you can change the appearance of the row by using the CoveredRange and column's HeaderText. First you can try setting the column header text of all column to String.Empty and add covered ranges in the column header to make your required look. And you can set the cellvalue of the extra row by using the column name in a datasource. Below is a code snippet that show this task.

foreach(GridBoundColumn column in this.grid.Binder.InternalColumns)
{
column.HeaderText = String.Empty;
}
this.grid.Model.CoveredRanges.Add(GridRangeInfo.Cells(0,1,0,3)); // first three cell act as one cell.
this.grid.Model.CoveredRanges.Add(GridRangeInfo.Cells(0,4,0,5));

int i =1;
foreach(GridBoundColumn column in this.grid.Binder.InternalColumns)
{
this.grid.Model[1,i].Text = column.MappingName;
i++;
}

Best regards,
Haneef

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.

;