or
$telerik.$(sourceListBox._getGroupElement()).focus();
but this does not help.OnClientSelectedIndexChanged
as shown in this code:| <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestListBox.aspx.cs" Inherits="TestListBox" %> |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| <html xmlns="http://www.w3.org/1999/xhtml"> |
| <head runat="server"> |
| <title></title> |
| <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" /> |
| </head> |
| <body> |
| <form id="form1" runat="server"> |
| <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> |
| <Scripts> |
| <%--Needed for JavaScript IntelliSense in VS2010--%> |
| <%--For VS2008 replace RadScriptManager with ScriptManager--%> |
| <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> |
| <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> |
| <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" /> |
| </Scripts> |
| </telerik:RadScriptManager> |
| <script type="text/javascript"> |
| var lastSrcLB = ""; |
| // Maintain edits in |
| function ListBoxItemTransferred(sender, event) { |
| var destinationListBox = event.get_destinationListBox(); |
| var sourceListBox = event.get_sourceListBox(); |
| //$telerik.$(destinationListBox._getGroupElement()).focus(); |
| destinationListBox.clearSelection(); |
| lastSrcLB = sourceListBox.get_id(); |
| //$telerik.$(sourceListBox._getGroupElement()).focus(); |
| sourceListBox.clearSelection(); |
| } |
| function SelectedIndexChanged(sender, e) { |
| var item = e.get_item(); |
| alert(sender.get_id() + "::" + lastSrcLB + "::" + item.get_text()); |
| if (sender.get_id() == lastSrcLB) { |
| lastSrcLB = ""; |
| event.returnValue = false; // To late |
| event.cancelBubble = true; |
| item.set_selected(false); |
| return false; |
| } |
| } |
| </script> |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| </telerik:RadAjaxManager> |
| <div> |
| <telerik:RadListBox ID="SystemUserListBox1" |
| runat="server" |
| OnClientTransferred="ListBoxItemTransferred" |
| OnClientSelectedIndexChanged="SelectedIndexChanged" |
| AllowTransfer="True" |
| TransferToID="TeamUserListBox" |
| > |
| <ButtonSettings Position="Bottom" HorizontalAlign="Center" /> |
| <Items> |
| <telerik:RadListBoxItem runat="server" Text="RadListBoxItem1" /> |
| <telerik:RadListBoxItem runat="server" Text="RadListBoxItem2" /> |
| <telerik:RadListBoxItem runat="server" Text="RadListBoxItem3" /> |
| <telerik:RadListBoxItem runat="server" Text="RadListBoxItem4" /> |
| </Items> |
| </telerik:RadListBox> |
| <telerik:RadListBox ID="TeamUserListBox" |
| runat="server" |
| OnClientTransferred="ListBoxItemTransferred" |
| OnClientSelectedIndexChanged="SelectedIndexChanged" |
| > |
| </telerik:RadListBox> |
| </div> |
| </form> |
| </body> |
| </html> |
| Any better alternatives? (Would be nice if this behaviour could be set though properties..) Best Regards Gunnar Skogen |
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<BHPAHM.Models.InspectionSearchViewData>" %><%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <% using (Html.BeginForm()) {%> <%: Html.ValidationSummary(true) %> <table> <tr> <td> <div class="editor-label"> Entry Type </div> </td> <td> <div class="editor-field"> <%: Html.DropDownListFor(model => model.EntryTypeId, new SelectList(Model.EntryTypes, "ID", "Name"))%> <%: Html.ValidationMessageFor(model => model.EntryTypeId)%> </div> </td> </tr> <tr> <td> <div class="editor-label"> Location </div> </td> <td> <div class="editor-field"> <%: Html.DropDownListFor(model => model.LocationId, new SelectList(Model.Locations, "ID", "Name"))%> <%: Html.ValidationMessageFor(model => model.LocationId)%> </div> </td> </tr> <tr> <td> <div class="editor-label"> Equipment </div> </td> <td> <div class="editor-field"> <%: Html.DropDownListFor(model => model.EquipmentId, new SelectList(Model.Equipment, "ID", "Name"))%> <%: Html.ValidationMessageFor(model => model.EquipmentId)%> </div> </td> </tr> <tr> <td> <div class="editor-label"> Inspection Type </div> </td> <td> <div class="editor-field"> <%: Html.DropDownListFor(model => model.InspectionTypeId, new SelectList(Model.InspectionTypes, "ID", "Name"))%> <%: Html.ValidationMessageFor(model => model.InspectionTypeId)%> </div> </td> </tr> <tr> <td> Example RadComboBox </td> <td> <telerik:RadComboBox ID="RadComboBox1" Runat="server"> <Items> <telerik:RadComboBoxItem Text="One" Value="1" /> <telerik:RadComboBoxItem Text="Two" Value="2" /> <telerik:RadComboBoxItem Text="Three" Value="3" /> <telerik:RadComboBoxItem Text="Four" Value="4" /> </Items> </telerik:RadComboBox> <telerik:RadScriptManager ID="RadScriptManager1" runat="server" > </telerik:RadScriptManager> </td> </tr> </table> <p> <input type="submit" value="Search" /> </p> <p> Property1 = <%: ViewData["Property1"] %> <br /> Property2 = <%: ViewData["Property2"] %> </p> <% } %>| if (e.Item.ItemType == RadListViewItemType.DataItem || e.Item.ItemType == RadListViewItemType.AlternatingItem) |
| { |
| Control toolTipBtn = e.Item.FindControl("btnView"); |
| if (!Object.Equals(toolTipBtn, null)) |
| { |
| if (!Object.Equals(this.RadToolTipManager1, null)) |
| { |
| this.RadToolTipManager1.TargetControls.Add(toolTipBtn.ClientID, (e.Item as RadListViewDataItem).GetDataKeyValue("ProductID").ToString(), true); |
| } |
| } |
| } |
| <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"> |
| <AjaxSettings> |
| <telerik:AjaxSetting AjaxControlID="radioSizes"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadListView1" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="shipOptions"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadListView1" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadComboBox1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadListView1" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| <telerik:AjaxSetting AjaxControlID="RadListView1"> |
| <UpdatedControls> |
| <telerik:AjaxUpdatedControl ControlID="RadListView1" |
| LoadingPanelID="RadAjaxLoadingPanel1" /> |
| <telerik:AjaxUpdatedControl ControlID="RadToolTipManager1" /> |
| </UpdatedControls> |
| </telerik:AjaxSetting> |
| </AjaxSettings> |
| </telerik:RadAjaxManager> |

/* Masterpages and Defults */#center {border:1px solid #93b4df;border-top:0;color:#6788be;padding:2.5em 2em 2em 2em;min-height:400px;height:auto !important;height:400px; }#conte {background-color:#fafafa;margin: 1em 2%;min-width:930px;position:absolute;width:95%;margin-top:0px;}#hat {background-color:#8CBFDA;height:2.4em;max-height:2.4em;}#login{ text-align:right; vertical-align:bottom;}#login a{ color:#fefeff; font-size:0.8em; font-weight:bold;}#header { background-color:#4e7dd1; width:100%; padding:0px 5px 0px 5px;}#pied {padding:0.5em;text-align:center;background-color: #4e7dd1;color:#fefeff;}.menuhaut {font-size:1em;list-style-type:none;margin:0;padding:0;}a { color:#6F8EC2; text-decoration:underline;}body {background-color: #4e7dd1;font-family:Arial, Helvetica, sans-serif;font-size:0.75em;color:#3950a1;}h1, h2, h3, h4, h5{ font-weight:bold; color:#666666;}h1 {font-size:1.2em;margin: 0.5em 0.5em 1em 0;}h2 {text-align:right;font-size:1.1em;margin:0.8em 0.5em 0.3em 0.6em;}h3 {font-size:0.9em;margin:0.8em 0.5em 0.3em 0.8em;}h4 {font-size:0.8em;margin:0.7em 0.5em 0.3em 1em;}h5 {font-size:0.7em;margin:0.6em 0.5em 0.2em 1.5em;}p {margin:1px 0.5em 0.5em 1.5em;}.mainmenu{ width:100%; padding:0; margin:0;}.RadMenu ul.rmRootGroup { float:none !important;}.error{ color:Red; }#bodyPop {background-color: #fafafa;font-family:Arial, Helvetica, sans-serif;font-size:0.75em;color:#3950a1;overflow:hidden}<
telerik:RadRating ID="RadRatingOverAll" runat="server" ItemCount="8" onrate="RadRating4_Rate" AutoPostBack="True" EnableToolTips="True" Attribute='<%# Eval("ID")%>' >
</telerik:RadRating>