I have an ASP.net button and I set the CssClass to something so that I can use Jquery to select it and force the click event when someone hits the enter key and this works the way I want it to. The problem is that I am using Telerik skins so when I assign the cssclass the styling on the button goes away. If I change the button to a RadButton the styling remains even if I set the CssClass to something however my Jquery selector obviously won't work anymore.
I have to select by class because I won't know the client id of the button because of edit form templates, master page, other containers, etc...
So how can I either:
a.) Select the RadButton using Jquery similar to the example below? Or,
b.) Style the ASP.net button using telerik skins while still assigning a CSSClass so that I can still use this below?
$(document).keypress(function (event) { if (event.keyCode == 13) { event.preventDefault(); $(".submit-button").click(); } else { return true; } });<%@ Register TagPrefix="custom" Namespace="MyCustomFilteringColumn.FilteringTemplateColumns"%><telerik:RadMultiPage ID="RadMultiPage1" runat="server" SelectedIndex="0"> <telerik:RadPageView ID="ProgrammingPageView" runat="server"> <telerik:RadGrid ID="ProgramGrid" runat="server" DataSourceID="prgDS" AllowFilteringByColumn="true"AllowSorting="true" AllowPaging="true" AutoGenerateColumns="False"ShowStatusBar="true" PageSize="7"> <PagerStyle Mode="NextPrevAndNumeric" Position="TopAndBottom" /> <MasterTableView DataKeyNames="ProgrammingID" EnableNoRecordsTemplate="true" ShowHeadersWhenNoRecords="true"> <NoRecordsTemplate>There isn't any data.</NoRecordsTemplate> <Columns>
<custom:MyCustomFilteringColumn DataField="Show" FilterControlWidth="180px" HeaderText="Show"> <headerstyle width="25%" /> <itemtemplate><%# Eval("Show") %></itemtemplate> </custom:MyCustomFilteringColumn>
For example, I want to indicate that the data comes out of the database sorted by Column A by default. If I add a SortExpression on the server, that column is shaded and has an arrow. If I try to sort by Column B using the client-side API, Column A will retain that shading and arrow supplied when the grid structure was created on the server, even though Column B is now being used for sorting and has an arrow also. If I then change the sort back to Column A, Column A gets a second arrow next to the arrow supplied on the server.
ASP.NET AJAX 2012 Q1 SP1 controls.