Telerik Radgrid Header Template Silverlight

  
Active6 years, 6 months ago

I need to add a header above the radGrid like Title: ABC Name: XYZ Column1 Column2 Clolumn3 Column4 abc &nb. Stack Overflow. Log In Sign Up; current community. Add Header/Title to telerik Radgrid? Ask Question 2. I have recently started working with telerik controls. I need to add a header above the radGrid like.

  1. Customizing Group Row Header of Silverlight DataGrid. It's time to create our row group header. The default template has the following XAML code for the Row Group Header style. A Codeproject Mentor, Telerik Developer Expert, Nokia Developer Champion, Windows 10 Champion, Microsoft Rockstar, Speaker in various Microsoft events, Author.
  2. From Q2 2012 GridTemplateColumn exposes a ClientItemTemplate property that allows the rendering of pure HTML into the column cell and the evaluation of JavaScript and data expressions. This RadGrid demo demonstrates how you can use the binding context of the item template to populate and customize the content of the column.
  3. Figure 2: Displaying custom content in column headers. Customizing the Headers. There are two elements on the headers that can be customized: Header Row - it is modified by setting an appropriate style as HeaderRowStyle of RadGridView. To learn how to style it take a look at the Styling the Header Row topic.

I have a RadGridView with groups, and in the header of group I am setting up a data template with a TextBlock bound to a property that contains large strings (less than 500 char). I have set the TextBlock to wrap its text, but no matter what I try, the text scrolls off to the right, but if I scroll the grid to the right, the group header doesnt scroll with it, so I cant read the info.

The only thing I've managed to do, is set the width of the TextBlock to a fixed width, and then it wraps, but because its a fixed width, it doesnt do well when I change the size of the browser window.

Any ideas?

Here is the XAML:

I have also tried things like this:

Rick HodderRick Hodder
1,3783 gold badges22 silver badges49 bronze badges

1 Answer

The GroupHeaderTemplate is eventually applied to an instance of GridViewGroupRow.

Telerik Radgrid Example

You should be able to define an implicit style for that type, with HorizontalContentAlignment set to Stretch.

Silver SolverSilver Solver
2,2391 gold badge9 silver badges19 bronze badges
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.

Not the answer you're looking for? Browse other questions tagged silverlightradgridview or ask your own question.

Telerik Radgrid Header Template Silverlight

If you use Telerik’s RadGrid but don’t want to use the default styling template, there’s a quick way to apply your own CSS style to it. This may not be as sophisticated as using the skinning feature, but it surely does the trick.

The first thing we need to do is to write the custom css style, then assign it to CssClass attribute within the RadGrid markup. We also need to add Skin attribute with an empty value.

So we’re going to create the custom CSS first, then add the two attributes on the RadGrid Control markup as shown in the example below:

Free sheet music › Autres instruments › Koto or Shamisen or Shakuhachi By the most likes By the most well noted By the most commented By new releases By the most downloaded By the most listened By the most listened (human) Original instrumentation first By works titles By composers By oldest additions With video first Level: hard to easy. Koto

Telerik Radgrid Header Text

Create Custom CSS

RadGrid is rendered as an HTML table on the ASP.NET page, so make sure you style it as a table element. In this example, we’ll name our CssClass element rgview.

Add Markup Attributes

Add Skin=”” and assign the css to CssClass attribute. See the highlighted section.

That’s all there is to it. Here are the screenshots to show the difference between the default and custom style.

Default

Telerik Radgrid Selectedindexchanged

Custom