Unplanned
Last Updated: 24 Mar 2017 14:50 by ADMIN
ADMIN
Marin Bratanov
Created on: 24 Mar 2017 14:40
Category: Grid
Type: Feature Request
1
Label attribute should be added to all inputs located in RadGrid pager in order for WCAG validation to pass.
Workaround for the NextPrevAndNumeric mode is to set the AssociatedControlID of the label

	protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
	{
		if (e.Item is GridPagerItem)
		{
			GridPagerItem pager = e.Item as GridPagerItem;
			Label lbl = pager.FindControl("ChangePageSizeLabel") as Label;
			Panel pnl = lbl.Parent as Panel;
			RadComboBox combo = pnl.FindControl("PageSizeComboBox") as RadComboBox;
			lbl.AssociatedControlID = combo.ID;
		}
	}

	<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server" DataSourceID="SqlDataSource1" AllowSorting="True"
						AllowPaging="True" GridLines="None" Width="100%" OnItemDataBound="RadGrid1_ItemDataBound">
		<PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" PageSizeControlType="RadComboBox"></PagerStyle>
	</telerik:RadGrid>
			
	<asp:SqlDataSource ID="SqlDataSource1" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
						ProviderName="System.Data.SqlClient" SelectCommand="SELECT CustomerID, CompanyName, ContactName, ContactTitle, Address, PostalCode FROM Customers"
						runat="server"></asp:SqlDataSource>
0 comments