Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
261 views
Hi,

Default behavior when transferring items between ListBoxes seem to be that the adjacent item to the moved item in the source listbox is selected. This is not what I wanted, so I tried various ways to unselect all in the source listbox after a transfer.
When transferring items between two listboxes (AllowTransfer="true"), the ListBox.clearSelection dows not work on the source ListBox.
I also tried using this statement from another related thread:

$telerik.$(sourceListBox._getGroupElement()).focus();

 but this does not help.

Only way I made it work is the rather graceless way of using

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

T. Tsonev
Telerik team
 answered on 15 Jul 2010
3 answers
222 views
I have successfully used a RadComboBox on an MVC 2 View page (using Visual Studio 2010).

I needed to use one inside an MVC user control so added a RadComboBox and RadScriptManager to it ...
but I get an error appearing in the design view of the user control for both the RadComboBox and the RadScriptManager
"Value cannot be null. Parameter name: frameworkName" -- see attached screenshot.

It runs ok but the combo box in the user control is unresponsive - it doesn't respond to a clicking on it.

Here is the code below for the user control (.ascx)

Some help would be appreciated,
Thanks,

Harvey

<%@ 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>
 
 
    <% } %>

Sebastian
Telerik team
 answered on 15 Jul 2010
1 answer
100 views
I was wondering if it's possible to set the ChartSeries appearance with CSS. I'm doubting, since it is an image, but figure I'll check. :)

The main thing I'm looking for is the PointMark properties.
So, series.Appearance.TextAppearance.PointMark.* is the stuff I'd like to set with css.

Thanks.
Ves
Telerik team
 answered on 15 Jul 2010
3 answers
178 views
I am using the RadToolTipManager in conjunction with a RadListView and they work on intital page load but on postback the ToolTips do not show up and the OnAjaxUpdate never fires. I update the RadListView from form controls outside the RadListView and on postback I add the TargetControls as follows

            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); 
                    } 
                } 
            } 

I also make sure to clear the TargetControls collection before rebinding the RadListView and have verified that they are removed and the new controls are added and the TargetControls collection has the correct elements.

In addition I have my RadAjaxManager setup as follows
<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> 

Is there something I am missing that would cause this behavior on postback?


Svetlina Anati
Telerik team
 answered on 15 Jul 2010
1 answer
147 views
Is possible use search with fulltext mssql search? for best performance.~ 10x faster like LIKE*. But i want use fast 3.5 LINQ version from 300.000 items demo;.
Radoslav
Telerik team
 answered on 15 Jul 2010
1 answer
330 views
I want to type some data into the ComboBox Text area and hit enter to have that data added to the combobox.

How can I do that?
Shinu
Top achievements
Rank 2
 answered on 15 Jul 2010
1 answer
98 views
Hi!

I am binding RadGrid with list of Users like RadGridUser.DataSource = userList and userList is List<User>, my question is, is there any way to get User object from the RadGrid on itemcommand or itemdatabound, I always found DataItem null...

Tsvetoslav
Telerik team
 answered on 15 Jul 2010
2 answers
65 views
hi,

im using radformdecorator and im having problem with all the text within my pages when i use non-IE browser. they seem edgy, thinner and pixelated. Please see picture attachments.

Here is my css:

/* 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
}
Georgi Tunev
Telerik team
 answered on 15 Jul 2010
1 answer
64 views
possible fill atribute with declaratived way? i need put ID to rating attribute in grid -> nested view. Somthing like this:

<

 

 

telerik:RadRating ID="RadRatingOverAll" runat="server" ItemCount="8" onrate="RadRating4_Rate" AutoPostBack="True" EnableToolTips="True" Attribute='<%# Eval("ID")%>' >

 

 

 

</telerik:RadRating>

 

Tsvetie
Telerik team
 answered on 15 Jul 2010
1 answer
127 views
Hi..
How do I change the font / style on the vertical tabs?   Changing the font/size doesn't seem to do anything..

Is there anyway to make the tab horizontial but have the pane slide left?

thanks again
Svetlina Anati
Telerik team
 answered on 15 Jul 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?