Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
80 views
I have been trying to accomplish essentially what the "Related ComboBox" demo does (http://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multiplecomboboxes/defaultcs.aspx) but with a slight twist.  I want to be able to use the filter.  This seems to break the demo and I'm trying to figure out how to "fix" it.  Also, when not using the filter (and purely using the keyboard for navigation) you can arrow down and use the tab key to select the highlighted item and advance to the next ComboBox.  This also does not work properly with the filter.


To reproduce, I took the demo code and simply added Filter="Contains" and AllowCustomText="False" to all 3 of the RadComboBoxes.

Could someone point me in the right direction to making this work right?

Thanks!
Ivana
Telerik team
 answered on 01 May 2012
5 answers
129 views
Hello. I've a little issue to get the combobox as I want it to be.
I have, in a database, a table "colors" (let say it only has an "ID" and "code" fields). I want to populate a radcombobox with a small square of each color.

Here's what I do:

<telerik:RadComboBox ID="rcbProdColors" Width="60" runat="server" MarkFirstMatch="false"  AllowCustomText="false" DataValueField="ID" >
              <ItemTemplate>
                     <div style=" height:15px;width:15px;border:solid black 1px;background-color: #<%# Eval("Code")%>"></div>                                
            </ItemTemplate>                      
</telerik:RadComboBox>

And in the code behind:

Dim query = (From c In db.Colors Select c)
rcbProdColors.DataSource = query
rcbProdColors.DataBind()

It's working but not completly.
I have two main issues:

First: The first "item" of the combobox isnt a color square but text saying "colors". I dont know where it comes from, my guess is it is the name of the table in the database. How can I remove it and have a color square as first item?

Second: More important: I can't select anything... whatever my choice, the selected item will always be the first item (in this case the text "colors"). How can I make a selection on this combobox?

Thanx in advance for yours answers.
Ivana
Telerik team
 answered on 01 May 2012
4 answers
171 views
Hello,

I have a RadComboBox with a single RadTreeView as the template item. I essentially want to allow the user to pick an option from the Tree in the drop down, trigger a postback on the tree nodeclick to save and act on the selection, then set the text of the combo box to the item that was selected in the Tree. The only way I've been able to achieve this thus far is by setting the AllowCustomText attribute to "true" on the RadCombo box. If I don't set this to true, the RadCombo box does not display the value that I have set from the selected tree node during the postback. When I set AllowCustomText to "true" however, this allows the user to type text into the RadComboBox field, which is not acceptable. I need to restrict the value of the RadComboBox to the items displayed in the contained tree. Preferably, the user cannot type into the RadComboBox at all. Clicking on this field should just open the drop down so the user can select an item from the tree. 

Markup:
<telerik:RadComboBox ID="RadComboObjectPicker" runat="server" Skin="Office2010Blue" Width="150px" Height="300px" AccessibilityMode="True" EnableTextSelection="False" AllowCustomText="true" DropDownWidth="250px">
<Items>
<telerik:RadComboBoxItem runat="server" TabIndex="1" />
</Items>       
<ItemTemplate>
<telerik:RadTreeView ID="RadTreeObjectPicker" runat="server" Skin="Office2010Blue" OnNodeClick="RadTreeObjectPicker_NodeClick" TabIndex="1" >
</telerik:RadTreeView>
</ItemTemplate>
</telerik:RadComboBox>
 
C# Code Behind:
protected void RadTreeObjectPicker_NodeClick(object sender, RadTreeNodeEventArgs e)
{
     
    //if (!String.IsNullOrEmpty(e.Node.Value))
    //{
    //    TakeSomeAction(e.Node.Value);
    //}
 
    RadComboObjectPicker.Text = e.Node.Text;
}

I'm open to any suggestions to achieve this behavior. Thanks! 


Vijay
Top achievements
Rank 1
 answered on 01 May 2012
2 answers
111 views
I have placed my radGrid inside a Radcombobox but I try to open a radcombobox by calling OnClientDropDownOpening="OnClientDropDownOpening" using ajax request it gets closed automatically.

 function OnClientDropDownOpening(sender, args) {
            var comboText = sender.get_text();
            if (comboText.length > 2) {
                 $find("<%= rapJob.ClientID %>").ajaxRequest("LoadFilteredData," + comboText);
            }
            else {
                args.set_cancel(true);
            }
        }

 Protected Sub rapJob_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs)


        Dim rgJob As RadGrid = TryCast(rcbJob.Items(0).FindControl("rgJob"), RadGrid)
        If e.Argument.IndexOf("LoadFilteredData") <> -1 Then
            rgJob.Rebind()
        End If


    End Sub


    Protected Sub rgJob_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs)


        Dim rgJob As Telerik.Web.UI.RadGrid = source


        Dim IJobs = (From Jobs In dbContext.FF_Jobs Where Jobs.IsCreated = True And Jobs.IsCancelled = False And Jobs.IsTemplate = False
                    Select Jobs).ToList


        rgJob.DataSource = IJobs


    End Sub

<telerik:RadAjaxPanel ID="rapJob" RequestQueueSize="5" runat="server" Width="100%"
               OnAjaxRequest="rapJob_AjaxRequest" EnableOutsideScripts="True" HorizontalAlign="NotSet"
               ScrollBars="None" LoadingPanelID="alpJob">
               <telerik:RadComboBox ID="rcbJob" EmptyMessage="- please select job -" runat="server"
                   OnClientDropDownOpening="OnClientDropDownOpening" MarkFirstMatch="True" Width="300px"
                   Skin="Vista" AutoPostBack="True" AutoCompleteSeparator="true" Filter="Contains"
                   AllowCustomText="true">
                   <ItemTemplate>
                       <div>
                           <telerik:RadGrid ID="rgJob" runat="server" Width="95%" Skin="Vista" AutoGenerateColumns="False"
                               AllowSorting="True" AllowMultiRowSelection="False" OnNeedDataSource="rgJob_NeedDataSource"
                               AllowPaging="True" GridLines="Both" ExpandAnimation-Type="None" CollapseAnimation-Type="None">
                               <PagerStyle Mode="NumericPages"></PagerStyle>
                               <MasterTableView Width="100%" DataKeyNames="ID,JobName" Name="rgJob" CommandItemDisplay="None" NoMasterRecordsText=""   >
                                   <Columns>
                                       <telerik:GridBoundColumn SortExpression="ID" HeaderText="ID" HeaderButtonType="TextButton"
                                           DataField="ID" UniqueName="ID" ReadOnly="true">
                                       </telerik:GridBoundColumn>
                                       <telerik:GridBoundColumn SortExpression="JobName" HeaderText="Job Name" HeaderButtonType="TextButton"
                                           DataField="JobName" UniqueName="JobName">
                                       </telerik:GridBoundColumn>
                                   </Columns>
                               </MasterTableView>
                               <ClientSettings EnableRowHoverStyle="true">
                                   <Selecting AllowRowSelect="true" />
                                   <Scrolling AllowScroll="true" UseStaticHeaders="true" />
                               </ClientSettings>
                           </telerik:RadGrid>
                       </div>
                         
                   </ItemTemplate>
                   <Items>
                       <telerik:RadComboBoxItem runat="server" Text=" "></telerik:RadComboBoxItem>
                   </Items>
               </telerik:RadComboBox>
           </telerik:RadAjaxPanel>

Ivana
Telerik team
 answered on 01 May 2012
1 answer
130 views
hi, i have this code

<div id="contentlogin">
        <telerik:RadSplitter runat="server" Skin="Black" Orientation="Horizontal" BorderSize="0" PanesBorderSize="0" Width="500px">
            <telerik:RadPane runat="server" Scrolling="none" ShowContentDuringLoad="true">
                <telerik:RadSlidingZone runat="server" Width="500px">
                    <telerik:RadSlidingPane ID="tabslidelog" Title="<span class='txt11fffN'>Login</span>" IconUrl="~/img/blogs.png" TabView="TextAndImage" runat="server" Width="500px" MaxWidth="500" MinWidth="500" MaxHeight="150" EnableDock="true" EnableResize="false" Overlay="true">
                        Pane 1 Content
                    </telerik:RadSlidingPane>
                </telerik:RadSlidingZone>
            </telerik:RadPane>
        </telerik:RadSplitter>
    </div>

my problem is in the width of tabview or the title from SlidingPane will be the same; attachment explains better me problem. Thanks.
Dobromir
Telerik team
 answered on 01 May 2012
1 answer
167 views
Hello

In my my application I have created Training .aspx page in that page i have used usercontrol Mydocument.ascx in that  user control i have used  telerik RadEditor Control  but i want my page scroll position set to Top I have written following  javascript code on Training.aspx page and also Mydocument.ascx page  but when I browse This page in IE-8 Page scroll position is set to the Cursor Position of Rad Editor  but I want to show my page from Top I want my page scroll position should be top so I have used Following Javascript Code it works fine in Other browser but in IE-8  after page load scroll position is  set according to cursor position of radEditor

<script type="text/jscript">
    var xPos, yPos;
    var prm = Sys.WebForms.PageRequestManager.getInstance();
    prm.add_beginRequest(BeginRequestHandler);
    prm.add_endRequest(EndRequestHandler);
    function BeginRequestHandler(sender, args) {

        xPos = $('#<%=reContent.ClientID %>').scrollLeft;
        yPos = $('#<%=reContent.ClientID %>').scrollTop;
    }
    function EndRequestHandler(sender, args) {
        $('#<%=reContent.ClientID %>').scrollLeft = xPos;
        $('#<%=reContent.ClientID %>').scrollTop = yPos;
    }
</script>

please reply as soon as possible
Rumen
Telerik team
 answered on 01 May 2012
1 answer
129 views
Hi, for 2 hours now I'm trying to get a selected value on page load...
I'm using jquery and I ve read every page about radcombox on client-side...

here's what I do.
Some one to tell me what's wrong?
Thanx

  $j(document).ready(function() {
      var combo = getElem("<%= myCombobox.ClientID %>");
      var item = combo.get_selectedItem();
      var val = item.get_value();
//code...
});
Dimitar Terziev
Telerik team
 answered on 01 May 2012
1 answer
103 views
I'm using the rad editor to store info in a db for a page. I tried, removing characters manually, but it would throw an error. So, then I tried using a command parameter i.e. cmd.parameters.addwithvalue("param", RadEditor1.text) but that loses all of the html stuff.
I'm assuming I need to encode and then decode it somehow, I just don't know the right methods. Can you help me out?
Rumen
Telerik team
 answered on 01 May 2012
1 answer
123 views
When using the editors ExportToPdf method, we often get the right hand side of the document cut off. Is this a known issue?
Rumen
Telerik team
 answered on 01 May 2012
3 answers
129 views
Not sure what the problem is. Only shows up in IE.


Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET4.0C; .NET4.0E)
Timestamp: Wed, 25 Apr 2012 20:32:45 UTC


Message: 'undefined' is null or not an object
Line: 19069
Char: 1
Code: 0
URI: http://qa.teams2.ytb.com/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d1.0.61025.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a1f0f78f9-0731-4ae9-b308-56936732ccb8%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.1.519.20%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a7807982c-d856-4b9c-96d9-4b1b757dd848%3a16e4e7cd%3aed16cbdc%3af7645509%3a11a04f7e%3a24ee1bba%3ae330518b%3a1e771326%3a8e6f0d33%3a6a6d718d%3aaa288e2d%3a8674cba1%3ab7778d6c%3ac08e9f8a%3a59462f1%3aa51ee93e%3ae085fe68%3a58366029%3a874f8ea2%3a19620875%3a39040b5c%3a33108d14%3abd8f85e4%3ac8618e41%3ae4f8f289


Kate
Telerik team
 answered on 01 May 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?