Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Accessibility and the Datagrid

Thread Tools

Accessibility and the Datagrid

Posts: n/a
Hi folks,
I'm using 1.1 with C#

I've been instructed by my employers that I must comply with the UK DDA
(Disability Discrimination Act 1995).

My app is largely compliant only semantic markup and plenty of CSS, but even
though my datagrid has UseAccessiblityHeaders set to true this is not enough
that property only adds scope="col" and <th> elements

I need to access the header elements and add
Then I need to access each <td> and add a headers="" to follow the name of
that column's Id attribute

I'm doing this in the ItemCreated event of the datagrid like so..

switch (e.Item.ItemType)
case ListItemType.Header:
for(int i=0;i<e.Item.Controls.Count;i++)
tc=(TableCell) e.Item.Controls[i];
case ListItemType.Item:


my problem
the ID of H+ integer is giving me a weirder and longer name made up by the
control itself



second how can I add the headers= attribute into the body of the table (i.e
the other cells) to get each one in turn to reflect that it belongs to that

I thought I could use InnerHtml, but how do I do that to a cell at runtime...

or perhaps you have a better idea altogether how to make my datagrid
compliant with accessibility standards

Regards, and thanks in advance
Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.Net accessibility datagrid and table header ASP .Net 0 07-20-2006 05:16 AM
.net and accessibility darrel ASP .Net 4 08-04-2005 09:04 PM
accessibility and asp:button JV ASP .Net 3 07-06-2005 02:41 PM and wai accessibility James Brett ASP .Net 0 05-21-2004 10:00 AM and Web Accessibility Standards Paul G ASP .Net 1 02-26-2004 10:26 PM