This is a migrated thread and some comments may be shown as answers.

[Solved] Column Alignment and Hiding Headers

2 Answers 199 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jim
Top achievements
Rank 1
Jim asked on 16 Jan 2008, 08:15 PM
Hello,

I have two questions:

1) I recall reading somewhere that changes were planned to help with aligning columns in hierarchical grids.  Is there an updated sample or article on how to accomplish this?

2) I want to suppress the headings for the 2nd and 3rd levels of a hierarchical grid.  Is this different under prometheus or do I have to do this using the ItemCreated event?

Thanks in advance,
Jim

2 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 18 Jan 2008, 04:10 PM
Hello Jim,

Thank you for your questions.

Straight onto them:

  1. How to align columns in standard hierarchy and in self-referencing grid you can learn from the following resources on our site:

    http://www.telerik.com/help/radcontrols/prometheus/?grdAlignColumnsInHierarchy.html

    http://www.telerik.com/support/kb/article/b454K-khh-b454T-a-b454c-a.aspx
  2. If you would like to hide the headers in each level except in the master table, simply wire the ItemCreated event, make conditional check whether the item is GridHeaderItem and identify current table in order to show/hide the header, namely:

    private void RadGrid1_ItemCreated(object sender, Telerik.WebControls.GridItemEventArgs e)     
    {     
        if (e.Item is GridHeaderItem && (e.Item.OwnerTableView != RadGrid1.MasterTableView))     
        {     
            e.Item.Style["display"] = "none";     
        }     

    For standard grid hierarchy you can also set ShowHeader = false for each GridTableView instance in the hierarchy.

Best regards

Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
HHH
Top achievements
Rank 1
answered on 13 Feb 2008, 09:45 PM
ITs not working for me.
can you help me out..i have the same problem..alignment in grid heirarchy

Thanks
HHH
Tags
Grid
Asked by
Jim
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
HHH
Top achievements
Rank 1
Share this question
or