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

[Solved] Column.Encoded ignored for column titles?

3 Answers 102 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.
Luke
Top achievements
Rank 1
Luke asked on 19 Mar 2010, 12:45 PM
I want to have a column of checkboxes in my grid to select individual rows, and have a checkbox in the column title for "select / deselect all".  In the beta release (2009.3.1320) I could achieve what I wanted like this:

            .Columns(columns => columns 
                .Add(c => c.AccountId) 
                .Format("<input type=\"checkbox\" class=...) 
                .Title("<input type=\"checkbox\" class=...) 
                .Encoded(false) 
 

... but in the 2010.1.309 release this no longer works.  The checkboxes in the rows appear correctly (via Format) but the column title shows the encoded Html source instead of a checkbox.  Is this a deliberate change, and if so is there an alternate way of getting a checkbox into the column title?  I don't want to use a custom toolbar for one control as this would waste space, and I can't use the .Template property as I'm using Ajax binding on my grid.


3 Answers, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 19 Mar 2010, 01:36 PM
Hello Luke,

Please check these online demos:
http://demos.telerik.com/aspnet-mvc/grid/checkboxesajax
http://demos.telerik.com/aspnet-mvc/grid/templatesclientside

Sincerely yours,
Georgi Krustev
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
Luke
Top achievements
Rank 1
answered on 19 Mar 2010, 02:27 PM
Thanks Georgi, but those posts don't answer the problem I have.  It's the column title behaviour that has changed, not the cells in the rows.  The attached screenshots show what the problem is - they were produced using the same values for column format and title but produce very different results.
                .Format("<input type=\"checkbox\" class=\"multiReviewSel\" id=\"Sel{0}\" name=\"Sel{0}\" value=\"{0}\">") 
                .Title("<input type=\"checkbox\" class=\"selectAllSel\" id=\"Sel" + Model.Key.SafeKey + "\" name=\"" + Model.Key.SafeKey + "\">") 
 

0
Accepted
Atanas Korchev
Telerik team
answered on 19 Mar 2010, 02:30 PM
Hello Luke,

We are aware of this problem. Please review this forum thread for a solution. We will revert to the old behavior in the next release.

Kind 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
Luke
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Luke
Top achievements
Rank 1
Atanas Korchev
Telerik team
Share this question
or