I have a RadGrid with three columns. One of those columns is always hidden.
When there are no records in the grid, the grid shows the NoRecordsTemplate, which just display the message "There are no records".
My problem is that I get this W3C error when I run my grid markup through the W3C Validator:
"A table row was 2 columns wide, which is less than the column count established using column markup (3)."
So the problem is that the colspan for the NoRecords td is 2, when it should be 3. It looks like the code is only making the colspan 2 since it's ignoring the hidden column.
Here's the markup with the problem. The W3C error occurs on the fifth to last row, with the rgNoRecords class.
Are there any workarounds for this problem? Thanks.
When there are no records in the grid, the grid shows the NoRecordsTemplate, which just display the message "There are no records".
My problem is that I get this W3C error when I run my grid markup through the W3C Validator:
"A table row was 2 columns wide, which is less than the column count established using column markup (3)."
So the problem is that the colspan for the NoRecords td is 2, when it should be 3. It looks like the code is only making the colspan 2 since it's ignoring the hidden column.
Here's the markup with the problem. The W3C error occurs on the fifth to last row, with the rgNoRecords class.
Are there any workarounds for this problem? Thanks.
<
th
scope
=
"col"
class
=
"rgHeader"
>
<
a
onclick
=
"Telerik.Web.UI.Grid.Sort($find('ctl01_TemplateBody_WebPartManager1_gwpciNewDynamicContentCollectionOrganizerCommon_ciNewDynamicContentCollectionOrganizerCommon_Events_ResultsGrid_Grid1_ctl00'), 'Event name'); return false;"
id
=
"ctl01_TemplateBody_WebPartManager1_gwpciNewDynamicContentCollectionOrganizerCommon_ciNewDynamicContentCollectionOrganizerCommon_Events_ResultsGrid_Grid1_ctl00_ctl02_ctl01_btn_ResultsGrid_2_Sort_Event_name"
title
=
"Click here to sort"
href
=
"javascript:__doPostBack('ctl01$TemplateBody$WebPartManager1$gwpciNewDynamicContentCollectionOrganizerCommon$ciNewDynamicContentCollectionOrganizerCommon$Events$ResultsGrid$Grid1$ctl00$ctl02$ctl01$btn_ResultsGrid_2_Sort_Event_name','')"
>Event name</
a
>
</
th
>
<
th
scope
=
"col"
class
=
"rgHeader"
>
<
a
onclick
=
"Telerik.Web.UI.Grid.Sort($find('ctl01_TemplateBody_WebPartManager1_gwpciNewDynamicContentCollectionOrganizerCommon_ciNewDynamicContentCollectionOrganizerCommon_Events_ResultsGrid_Grid1_ctl00'), 'Starting'); return false;"
id
=
"ctl01_TemplateBody_WebPartManager1_gwpciNewDynamicContentCollectionOrganizerCommon_ciNewDynamicContentCollectionOrganizerCommon_Events_ResultsGrid_Grid1_ctl00_ctl02_ctl01_btn_ResultsGrid_3_Sort_Starting"
title
=
"Click here to sort"
href
=
"javascript:__doPostBack('ctl01$TemplateBody$WebPartManager1$gwpciNewDynamicContentCollectionOrganizerCommon$ciNewDynamicContentCollectionOrganizerCommon$Events$ResultsGrid$Grid1$ctl00$ctl02$ctl01$btn_ResultsGrid_3_Sort_Starting','')"
>Starting</
a
>
</
th
>
<
th
scope
=
"col"
class
=
"rgHeader"
style
=
"display:none;"
>
<
a
onclick
=
"Telerik.Web.UI.Grid.Sort($find('ctl01_TemplateBody_WebPartManager1_gwpciNewDynamicContentCollectionOrganizerCommon_ciNewDynamicContentCollectionOrganizerCommon_Events_ResultsGrid_Grid1_ctl00'), 'key_UniformKey'); return false;"
id
=
"ctl01_TemplateBody_WebPartManager1_gwpciNewDynamicContentCollectionOrganizerCommon_ciNewDynamicContentCollectionOrganizerCommon_Events_ResultsGrid_Grid1_ctl00_ctl02_ctl01_btn_ResultsGrid_5_Sort_0"
title
=
"Click here to sort"
href
=
"javascript:__doPostBack('ctl01$TemplateBody$WebPartManager1$gwpciNewDynamicContentCollectionOrganizerCommon$ciNewDynamicContentCollectionOrganizerCommon$Events$ResultsGrid$Grid1$ctl00$ctl02$ctl01$btn_ResultsGrid_5_Sort_0','')"
>
</
a
>
</
th
>
</
tr
>
</
thead
>
<
tbody
>
<
tr
class
=
"rgNoRecords"
>
<
td
colspan
=
"2"
style
=
"text-align:left;"
>
<
div
>There are no records.</
div
>
</
td
>
</
tr
>
</
tbody
>