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

[Solved] Html Title of the column

3 Answers 214 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Akzhol The Kyrgyz
Top achievements
Rank 1
Akzhol The Kyrgyz asked on 13 Mar 2010, 02:11 PM
Hi,

I need a checkbox as a title in the column[ title will be "select all", each individual cell will "select the item"):
- In previous version I was doing this by supplying html as a title.i.e.:
  • column.Add(item =>{%>
                    <input id="cb<%= item.ID %>" style="border: none" type="checkbox" value="<%= item.ID %>"
                        onclick="checkClick('cb<%= item.ID %>');" name="contentId" />
                    <%}).Title(" <input type=\"checkbox\" id=\"cbCheckAll\" onclick=\"checkAll('contentId');\" />").Width(35);


This is not working in new version of Telerik, plain html is being printed instead of checkbox. How can I achieve same result as in old version?


Thanks and Regards.

3 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 15 Mar 2010, 02:34 PM
Hi Akzhol The Kyrgyz,

This is an interesting way of using the Title :)

To enable it again you can modify the source of the grid. Open GridColumnHeaderHtmlBuilder.cs and replace this

new TextNode(Column.Title).AppendTo(parent);

with this

new LiteralNode(Column.Title).AppendTo(parent);

In the future we will provide a HeaderTemplate method which will allow the user to set the HTML contents of the header.

Regards,
Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
EricB
Top achievements
Rank 2
answered on 12 Jul 2010, 02:17 PM
Greetings,

  I was referred to this link as I am looking to put a <br /> to wrap my titles.  Do you know if the Q2 2010 MVC release will allow the header to be template based?

-Eric
0
Atanas Korchev
Telerik team
answered on 12 Jul 2010, 04:35 PM
Hi EricB,

No, header templates are not scheduled for the Q2 release.

Regards,
Atanas Korchev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
Akzhol The Kyrgyz
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
EricB
Top achievements
Rank 2
Share this question
or