Stacked headers instide stacked header
Hi,
I got grid with couple of coulms which contains stacked headers.
I would like to add one more stacked header on top of them (the marked one in the picture) which should contain 3 inner columns:
right one for changing the plane icon
center for changing another type of icon
left for showing or hiding a check box.
for that I think I need 3 stacked header inside the top stacked header or 3 cells.
any idea how to achive that.
thanks.
StackedHeader_bb9ef31.rar
I got grid with couple of coulms which contains stacked headers.
I would like to add one more stacked header on top of them (the marked one in the picture) which should contain 3 inner columns:
right one for changing the plane icon
center for changing another type of icon
left for showing or hiding a check box.
for that I think I need 3 stacked header inside the top stacked header or 3 cells.
any idea how to achive that.
thanks.
StackedHeader_bb9ef31.rar
SIGN IN To post a reply.
5 Replies
JJ
Jisha Joy
Syncfusion Team
July 5, 2010 07:13 AM UTC
Hi Ruslan,
You could achieve the desired behavior by adding grouping the required column to the stacked row descriptor. See the attached samppe for implementation.
Regards,
Jisha
GGC_31929137.zip
You could achieve the desired behavior by adding grouping the required column to the stacked row descriptor. See the attached samppe for implementation.
Regards,
Jisha
GGC_31929137.zip
RG
Ruslan Gasanbekov
July 6, 2010 07:14 AM UTC
This is not what I want.
I would like to show 3 columns in one stacked header which above one column, in order to be able to display two icons and one checkbox in one column stacked header.
Thanks
I would like to show 3 columns in one stacked header which above one column, in order to be able to display two icons and one checkbox in one column stacked header.
Thanks
JJ
Jisha Joy
Syncfusion Team
July 8, 2010 12:37 PM UTC
Hi,
Please refer the following code that allows us to group three columns under the same stacked header:
GridStackedHeaderDescriptor header1 = new GridStackedHeaderDescriptor("No");
header1.VisibleColumns.Add("SNo");
header1.VisibleColumns.Add("Department");
header1.VisibleColumns.Add("Location");
GridStackedHeaderRowDescriptor row1 = new GridStackedHeaderRowDescriptor("Details");
row1.Headers.Add(header1);
Please let me know if this helps.
Regards,
Jisha
Please refer the following code that allows us to group three columns under the same stacked header:
GridStackedHeaderDescriptor header1 = new GridStackedHeaderDescriptor("No");
header1.VisibleColumns.Add("SNo");
header1.VisibleColumns.Add("Department");
header1.VisibleColumns.Add("Location");
GridStackedHeaderRowDescriptor row1 = new GridStackedHeaderRowDescriptor("Details");
row1.Headers.Add(header1);
Please let me know if this helps.
Regards,
Jisha
RG
Ruslan Gasanbekov
July 13, 2010 11:10 AM UTC
Hi,
How can I add two dynamic icons(which can be changed in runtime)
to StackedHeaderCell which contains a checkbox.
The StackedHeaderCell is above one column.
How can I add two dynamic icons(which can be changed in runtime)
to StackedHeaderCell which contains a checkbox.
The StackedHeaderCell is above one column.
JJ
Jisha Joy
Syncfusion Team
July 19, 2010 09:44 AM UTC
Hi Ruslan,
You could achieve the desired behavior by custom drawing your image in the TableControlCellDrawn event handler of the GridGroupingControl. In this event you could check for the specified columheader and stack header and set the image. See the code:
Sample for your reference:
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GGC_BoundImg-309510967.zip
Please let me know if this helps.
Regards,
Jisha
You could achieve the desired behavior by custom drawing your image in the TableControlCellDrawn event handler of the GridGroupingControl. In this event you could check for the specified columheader and stack header and set the image. See the code:
private void gridGroupingControl1_TableControlCellDrawn(object sender, GridTableControlDrawCellEventArgs e)
{
GridTableCellStyleInfo style = e.Inner.Style as GridTableCellStyleInfo;
//for column header
if (style.TableCellIdentity.TableCellType == GridTableCellType.ColumnHeaderCell &&
style.TableCellIdentity.Column != null && style.TableCellIdentity.Column.Name == "Location")
{
GridStaticCellRenderer.DrawImage(e.Inner.Graphics, this.imageList1,1, e.Inner.Bounds, false);
}
// for the stacked header
if (style.TableCellIdentity.TableCellType == GridTableCellType.StackedHeaderCell && style.TableCellIdentity.ColIndex==1)
{
GridStaticCellRenderer.DrawImage(e.Inner.Graphics, this.imageList1, 0, e.Inner.Bounds, false);
}
}
Sample for your reference:
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=GGC_BoundImg-309510967.zip
Please let me know if this helps.
Regards,
Jisha
SIGN IN To post a reply.
- 5 Replies
- 2 Participants
-
RG Ruslan Gasanbekov
- Jul 4, 2010 12:07 PM UTC
- Jul 19, 2010 09:44 AM UTC