or
| <ClientSettings |
| EnableRowHoverStyle="true" |
| EnableAlternatingItems="true"> |
| <Selecting AllowRowSelect="true" /> |
| <ClientEvents OnGridCreated="GridCreated" OnRowDblClick="RowDblClick" /> |
| </ClientSettings> |

| <asp:TemplateField HeaderText="Par" ItemStyle-HorizontalAlign="center" HeaderStyle-Width="29px" |
| ItemStyle-Width="29px" > |
| <ItemTemplate> |
| <telerik:radnumerictextbox runat="server" id="txtSinglePar" width="25px" onfocus="HasFocus(this)" |
| emptymessage="Par"> |
| <ClientEvents OnKeyPress="MoveToNextTextBox" /> |
| <NumberFormat DecimalDigits="0" GroupSeparator="" /> </telerik:radnumerictextbox> |
| </ItemTemplate> |
| </asp:TemplateField> |
| function HasFocus(TextBox) { |
| textBoxWithFocus = TextBox; |
| } |
| function MoveToNextTextBox(sender, args) |
| { |
| //IF TAB KEY HAS BEEN PRESSED |
| if (args.get_keyCode() == 9) |
| { |
| var str = textBoxWithFocus.id.replace("_text", ""); |
| var id = str.substring(str.indexOf("_ctl"), str.indexOf("_txt")); |
| //GET THE NUMBER OF THE ROW IN GRIDVIEW |
| idid = id.replace("_ctl", ""); |
| newId = parseFloat(id) + parseFloat(01); |
| if (parseInt(newId) < 9) { |
| newId = "0" + newId; |
| } |
| var prevID = str.replace(id, newId); |
| if (parseFloat(id) < 9) |
| { |
| prevIDprevID = prevID.replace("_ctl", "_ctl0"); |
| prevIDprevID = prevID.replace("_ctl00", "_ctl0"); |
| } |
| var newCtl = document.getElementById(prevID); |
| if (newCtl != null && $find(newCtl.id) != null) |
| { |
| $find(newCtl.id).focus(); |
| } |
| args.set_cancel(true); |
| } |
| } |
| <telerik:RadGrid ID="gvTrackers" Height="560px" runat="server" AllowPaging="true" AllowSorting="True" |
| GridLines="None" AutoGenerateColumns="true" ShowGroupPanel="True" EnableHeaderContextMenu="true" |
| EnableHeaderContextFilterMenu="true" AllowMultiRowSelection="true" AllowFilteringByColumn="True" |
| OnNeedDataSource="gvTrackers_NeedDataSource" OnItemCreated="gvTrackers_ItemCreated" |
| OnExcelMLExportStylesCreated="gvTrackers_ExcelMLExportStylesCreated" OnExcelMLExportRowCreated="gvTrackers_ExcelMLExportRowCreated" |
| OnItemCommand="gvTrackers_ItemCommand" > |
| <HeaderStyle Height="40px" Width="100px" BackColor="#004000" Font-Size="8pt" Font-Bold="True" ForeColor="White" |
| HorizontalAlign="Right" BorderColor="white" BorderWidth="1px" /> |
| <ExportSettings IgnorePaging="true" ExportOnlyData="true"> |
| <Pdf AllowModify="false" AllowPrinting="true" PageWidth="16in" /> |
| </ExportSettings> |
| <MasterTableView AllowMultiColumnSorting="true" CommandItemDisplay="Top"> |
| <CommandItemSettings ShowExportToWordButton="true" ShowExportToExcelButton="true" |
| ShowExportToCsvButton="true" ShowExportToPdfButton="true" ShowAddNewRecordButton="false" /> |
| </MasterTableView> |
| <ClientSettings ReorderColumnsOnClient="True" AllowDragToGroup="True" AllowColumnsReorder="True"> |
| <Scrolling AllowScroll="true" UseStaticHeaders="true" /> |
| <Selecting AllowRowSelect="True"></Selecting> |
| <Resizing AllowRowResize="True" AllowColumnResize="True" EnableRealTimeResize="True" |
| ResizeGridOnColumnResize="False"></Resizing> |
| </ClientSettings> |
| <GroupingSettings ShowUnGroupButton="true" /> |
| <PagerStyle Mode="NextPrevAndNumeric" HorizontalAlign="Right" Font-Bold="true" AlwaysVisible="true" /> |
| </telerik:RadGrid> |
| string script = @"var oWindowMsg = top.window.radopen('Hello World', null); |
| oWindowMsg.setSize(200, 200); |
| oWindowMsg.set_modal(true); |
| oWindowMsg.set_visibleStatusbar(false); |
| oWindowMsg.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close); |
| oWindowMsg.add_pageLoad(function () { oWindowMsg.autoSize(true) });"; |
| if (RadScriptManager.GetCurrent(this).IsInAsyncPostBack) |
| { |
| RadAjaxManager.GetCurrent(this).ResponseScripts.Add(script); |
| } |
| else |
| { |
| this.ClientScript.RegisterStartupScript(this.GetType(), "mostrarMensaje", String.Format("<script language='javascript'>function f(){{{0}; Sys.Application.remove_load(f);}}; Sys.Application.add_load(f);</script>", script)); |
| } |
