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

A question about gridview

2 Answers 96 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Ray Wang
Top achievements
Rank 1
Ray Wang asked on 17 Nov 2009, 02:16 PM

hi,telerik,
   I'm a telerik user ,i encountered a problem when i used the gridview Control in my gui,i have two question as following:
  1>i just want to set the height of the header in the gridview,but i can't find out  which property should be set,could u pls give me an example  about how to implement it ?
  2>and another question ,when you set up a relation in the gridview ,and the childtable will be displayed in the current record,you will find a plus(+) image in the first cell ,i want to replace the plus(+) image with my image ,and how to implement ?
 thanks for you help and support

 

2 Answers, 1 is accepted

Sort by
0
Martin Vasilev
Telerik team
answered on 20 Nov 2009, 02:37 PM
Hello Ray Wang,

Thank you for the questions.

You can set header row height by using TableHeaderHeight property:
this.radGridView1.GridElement.TableHeaderHeight = 100;

You can use custom images for the hierarchy expand/collapse cell element through SignImage property. Please consider the following code:
void radGridView1_ViewCellFormatting(object sender, CellFormattingEventArgs e)
{
    GridGroupExpanderCellElement element = e.CellElement as  GridGroupExpanderCellElement;
    if (element != null)
    {       
        element.SignStyle = GridGroupExpanderCellElement.SignStyles.Image;
        if (element.RowInfo.IsExpanded)
            element.SignImage = _minusSign;
        else
            element.SignImage = _plusSign;
    }
}

Also you can achieve the same result by a custom theme. For additional information about using and applying custom themes please refer to our documentation

Do not hesitate to contact me again if you have any other questions.

Kind regards,
Martin Vasilev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Ray Wang
Top achievements
Rank 1
answered on 23 Nov 2009, 04:41 AM
many thanks
Tags
GridView
Asked by
Ray Wang
Top achievements
Rank 1
Answers by
Martin Vasilev
Telerik team
Ray Wang
Top achievements
Rank 1
Share this question
or