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

[Solved] 508 Compliant for RadGrid

1 Answer 121 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Chi Ming
Top achievements
Rank 1
Chi Ming asked on 25 Jun 2014, 06:07 PM
Hello, 


I know that the radgrid is 508 compliant, but the filtering columns on the radgird might be not 508 compliant. Is that correct? if so, how can I resolve this issue.  I tested it in IE browser using Web Accessibility toolbar from paciello group. They resulted there are no label inputs for the radgrid.

Thanks,
Chi Ming 

1 Answer, 1 is accepted

Sort by
0
Radoslav
Telerik team
answered on 30 Jun 2014, 08:19 AM
Hello Chi,

Thank you for contacting us.

Indeed the filtering inputs do not have associated with them labels. To pass the accessibility validation you can insert labels into the filtering cells by using following code snippet:
void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
    {
        GridFilteringItem filteringItem = e.Item as GridFilteringItem;
        if (filteringItem != null)
        {
            TextBox tb = filteringItem["ID"].Controls[0] as TextBox;
  
            Label l = new Label();
            l.Text = "Filter by ID";
            l.AssociatedControlID = tb.ID;
 
  
            filteringItem["ID"].Controls.AddAt(0,l);
  
        }
    }
Where the “ID” is the unique name of the column. Additionally I am sending you a simple example which demonstrates that approach. Please check it out and let me know if it helps you.

Looking forward for your reply.

Regards,
Radoslav
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Chi Ming
Top achievements
Rank 1
Answers by
Radoslav
Telerik team
Share this question
or