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

[Solved] How can I set a Grid header

5 Answers 175 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dewang Shah
Top achievements
Rank 1
Dewang Shah asked on 26 Jan 2010, 11:49 AM
Hi,

I need to display a header for the whole grid - not the columns, I know I can do that. The RadGrid class has a property called "ShowHeader" but there is no property to set the header text that I want to display.

Just to make it clear, I am looking to set some text _above_ the column headers as header text for the whole grid. Like a title, if you will.

Is there any way I can do this?

Thanks,
Dewang

5 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 26 Jan 2010, 11:56 AM
Hello Dewang,

You could use the Caption property:
<MasterTableView Caption="something" ...>

Regards,
Daniel
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
Dewang Shah
Top achievements
Rank 1
answered on 26 Jan 2010, 02:24 PM
Hi,

Thanks for that.

Is there any way to set footer text as well? I have tried the Summary property but that does not work.

Cheers
0
Daniel
Telerik team
answered on 26 Jan 2010, 08:26 PM
Hello Dewang,

I'm afraid the Summary property isn't suitable for this scenario. It provides a summary of the table's purpose and structure for user agents rendering to non-visual media such as speech and Braille.

It is possible to use the CommandItem for that purpose:
<MasterTableView CommandItemDisplay="Bottom" ...

<CommandItemTemplate>
   Something
</CommandItemTemplate>

Best regards,
Daniel
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
German
Top achievements
Rank 1
answered on 26 Jan 2010, 09:37 PM

I'm currently populating a hierarchical radgrid with two SqlDataSources (one for my MasterTableView and the other for my
DetailsView). I have the values of my DataKeyNames MasterKeyFIeld, DataKeyFiled all matching. Initially the page works as
expected. In addition, I have a few dropdownlists on the page that I would like to re-arrange the data on my grid by soon after
the user clicks a button. Once the user chooses the desired options from the dropdownlists and clicks the button, through codebehind
I'm changing the SelectCommand of the sqlDataSource and doing a RadGrid1.DataBind() on both DataSources.
my code in my vb page looks something like this:

SqlDataSource1.SelectCommand = "Command"
RadGrid1.DataBind()
SqlDataSource2.SelectCommand = "Command"
RadGrid1.DataBind()

After the button click, The MasterTableView applies the new SqldataSource that I set in codebehind(SqlDataSource1), however, my DetailsView still contains the information from my initial SqlDataSource2 Select Statement. I need that Data to be populated as well.
Any help/suggestions i would really appreciate, thank you

0
Daniel
Telerik team
answered on 01 Feb 2010, 11:22 AM
Hello German,

Please try to set the hierarchy load mode to Client:
<MasterTableView HierarchyLoadMode="Client" ...

Regards,
Daniel
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.
Tags
Grid
Asked by
Dewang Shah
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Dewang Shah
Top achievements
Rank 1
German
Top achievements
Rank 1
Share this question
or