Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

Accessibility and the Datagrid

 
 
=?Utf-8?B?Q2hhcmxlc0E=?=
Guest
Posts: n/a
 
      06-06-2006
Hi folks,
I'm using ASP.net 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
id=""
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];
tc.ID="H"+(i+1);
}
break;
case ListItemType.Item:

etc....

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

dgPortfolio__ctl1_H1
dgPortfolio__ctl1_H2

etc...

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
column

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
CharlesA
 
Reply With Quote
 
 
 
Reply

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 kaushik.jaimalani@gmail.com 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
asp.net and wai accessibility James Brett ASP .Net 0 05-21-2004 10:00 AM
asp.net and Web Accessibility Standards Paul G ASP .Net 1 02-26-2004 10:26 PM



Advertisments