C
Corey B
I have a data grid that has three columns: First Name, Middle Name,
and Last Name. The grid has a list of people with a blank row at the
bottom of the grid (in the footer) that allows the user to add a new
person to the list. There is also an Edit button at the end of each
row that allows the user to edit a particular row. So far - no problem
- easy to do.
I have been asked to make the grid section 508 compliant. The
requirement is that the column headers must have labels that reference
the text boxes in the footer row. On a normal web form it would look
like this:
<label for="txtFirstName">First Name</label>
<asp:textbox id="txtFirstName" runat="server" />
This allows a text reader to figure out that the words "First Name" are
associated with the text box "txtFirstName" and helps a blind person
understand how to fill out the form.
Now, back to my problem. I need to figure out a way to get the header
of a Data Grid column to work the same way. The biggest problem is
that I have no idea what the ClientID of the textbox will be. So I
definitely can't hard code the <label> item.
Does anyone have any idea how I can do this?
Thanks,
Corey
and Last Name. The grid has a list of people with a blank row at the
bottom of the grid (in the footer) that allows the user to add a new
person to the list. There is also an Edit button at the end of each
row that allows the user to edit a particular row. So far - no problem
- easy to do.
I have been asked to make the grid section 508 compliant. The
requirement is that the column headers must have labels that reference
the text boxes in the footer row. On a normal web form it would look
like this:
<label for="txtFirstName">First Name</label>
<asp:textbox id="txtFirstName" runat="server" />
This allows a text reader to figure out that the words "First Name" are
associated with the text box "txtFirstName" and helps a blind person
understand how to fill out the form.
Now, back to my problem. I need to figure out a way to get the header
of a Data Grid column to work the same way. The biggest problem is
that I have no idea what the ClientID of the textbox will be. So I
definitely can't hard code the <label> item.
Does anyone have any idea how I can do this?
Thanks,
Corey