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

GroupHeaderItem Gets Extra Elements

1 Answer 47 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 18 May 2010, 09:56 PM
I am trying to add some custom images to the end of each GroupHeader in my grid. In the ItemDataBound event, I am catching all the GridGroupHeaderItem occurrences and doing the following:

item.DataCell.Text = string.Format("<table style='border-collapse: none' class='groupcontrol'><tr><td>{0}</td><td>{1}</td><td>{2}</td></tr></table>", item.DataCell.Text, 
                                                   "<div onclick='WorkAreaControl_SelectGroupRows()' title='Select All Accounts In This Group Only'><img src='../App_Themes/Office/Images/16x16/Download Add.png'/>&nbsp;Select All In Group</div>"
                                                   "<div onclick='WorkAreaControl_DeselectGroupRows()' title='Deselect All Accounts In This Group Only'><img src='../App_Themes/Office/Images/16x16/Download Delete.png'/>&nbsp;Deselect All In Group</div>"); 
 

When this renders, I am getting an extra paragraph <p> element before and after this table.  Why is that happenng and how do I make it stop?

I have attached a screenshot that show the grid and the HTML markup generated below it


1 Answer, 1 is accepted

Sort by
0
Yavor
Telerik team
answered on 20 May 2010, 01:15 PM
Hello Bob,

The <p> element is rendered by default in the grid, when the groups are created.
This is demonstrated in the screenshot attached to this message, which demonstrates standard grouping of the control, with no extra custom code appended.
I hope this information helps.

Best wishes,
Yavor
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
Bob
Top achievements
Rank 1
Answers by
Yavor
Telerik team
Share this question
or