Accessibility and the Datagrid

Discussion in 'ASP .Net' started by =?Utf-8?B?Q2hhcmxlc0E=?=, Jun 6, 2006.

  1. 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;
    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
     
    =?Utf-8?B?Q2hhcmxlc0E=?=, Jun 6, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul G
    Replies:
    1
    Views:
    399
    John Timney \(Microsoft MVP\)
    Feb 26, 2004
  2. James Brett

    asp.net and wai accessibility

    James Brett, May 21, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    370
    James Brett
    May 21, 2004
  3. JV

    accessibility and asp:button

    JV, Jul 5, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    1,532
    =?Utf-8?B?c29jaWV0b3BpYS5uZXQ=?=
    Jul 6, 2005
  4. darrel

    .net and accessibility

    darrel, Aug 4, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    400
    darrel
    Aug 4, 2005
  5. Replies:
    0
    Views:
    680
Loading...

Share This Page