Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
111 views
Hi,

<telerik:RadComboBox ID="RadComboBox2" EnableViewState="false" EnableItemCaching="true"
            EnableLoadOnDemand="true" Filter="Contains"   runat="server" onitemsrequested="RadComboBox2_ItemsRequested" >
        </telerik:RadComboBox>
<asp:Button ID="Button1" runat="server" Text="Ok" onclick="Button1_Click" />

protected void RadComboBox2_ItemsRequested(object o, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
    {
        RadComboBox2.Items.Add(new RadComboBoxItem("--All--", "0"));
        RadComboBox2.Items.Add(new RadComboBoxItem("Accepted", "1"));
        RadComboBox2.Items.Add(new RadComboBoxItem("Not Accepted", "2"));
        RadComboBox2.Items.Add(new RadComboBoxItem("Pending", "3"));
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
      string s = RadComboBox2.SelectedValue;
    }


If we set true to "EnableLoadOnDemand" we are getting the following problem.

We are filling some values in the combobox. And on type some characters(accepted) the combobox gets filtered accordingly (refer attahced screen shot). Then without selecting the text (Accepted )in the combo press enter. while clicking the button "OK" the Selectedvalue for the entered character in the combobox becomes empty.

For example see the above code: Accepted is having value 1, this becomes empty on click of "OK" button. I think this problem is due to that the combobox is assuming the entered text as new item.

But both are same.How to solve this

Please help me

regards
sathies


Simon
Telerik team
 answered on 11 Dec 2009
5 answers
148 views
I have a tree view control which is in the second position in the tab order on the page.  I can set the focus to this control and tab through the nodes, but when i reach the last node and hit tab, focus is not set on the next control in the tab order.  i'm not sure where the focus gets set after tabbing out of the treeview, but if I tab one or two more times I can see the focus in the address bar of the browser.

I would like to be able to tab out of the treeview control and into the next control in the tab order.

Sean M. Severson


<div class="margin" > 
        <telerik:RadWindowManager ID='aWindowManager1' ShowContentDuringLoad="false" VisibleStatusbar="false" runat='server' Behavior="Default" InitialBehavior="None" Skin="Simple">  
            <Windows> 
<telerik:RadWindow runat="server" NavigateUrl="WC_Territory_Search.aspx" Behaviors="None" Behavior="None" InitialBehavior="None" Width="475px" Height="360px" Left="" Top="" OnClientClose="OnWCTerritoryClose" ID="RadWindow1" Style="display:none;" Modal="True" ReloadOnShow="true">  
                </telerik:RadWindow> 
</Windows> 
        </telerik:RadWindowManager> 
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="False" UpdateMode="Conditional">  
            <ContentTemplate> 
                <div id="header" style="left: 0px" runat="server" > 
                    <table class="SharedEntry + NoBorder" style="width: 750px; border-right: 1px solid;  
                        border-left: 1px solid; border-top: 1px solid; margin-bottom: 0; height: 40px;"> 
                        <caption> 
                            Contact Search</caption> 
                        <tr> 
                            <th class="noborder" style="width: 111px; vertical-align: bottom;">  
                                Contact Type:</th> 
                            <td style="width: 580px; vertical-align: bottom">  
                                <div class="categoryControls">  
                                    <asp:DropDownList ID="Search_ContactType" runat="server" Width="200px" AutoPostBack="True" 
                                        OnSelectedIndexChanged="Search_ContactType_SelectedIndexChanged" TabIndex="5">  
                                    </asp:DropDownList> 
                                </div> 
                                <div class="categoryControls" style="margin-left: 5px">  
                                    <cc3:HelpImageButton ID="HelpImageButton3" runat="server" ImageUrl="/SI/Images/help.ico" 
                                        CausesValidation="False" HelpTopicID="48" Height="20px" Width="20px" TabIndex="-1" /> 
                                </div> 
                                <div class="categoryControls" style="margin-left: 5px">  
                                    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1" 
                                        DisplayAfter="1">  
                                        <ProgressTemplate> 
                                            <img src="/SI/Images/status_anim.gif" alt="Wait" /> 
                                        </ProgressTemplate> 
                                    </asp:UpdateProgress> 
                                </div> 
                            </td> 
                        </tr> 
                    </table> 
                </div> 
                <div id="tree" style="left: 0px; overflow: auto; position: relative" runat="server">  
                    <table class="SharedEntry + NoBorder" style="width: 750px; border-right: 1px solid; border-left: 1px solid; margin-top: 0; margin-bottom: 0;  ">  
                        <tr> 
                            <th class="noborder" style="width: 111px; vertical-align: top;">  
                                Specialty:</th> 
                            <td style="vertical-align: top; width: 580px;">  
                                <telerik:RadTreeView ID="rtvSpecialty" runat="server" Width="550px" BorderStyle="Solid" 
                                    BorderWidth="1px" CheckBoxes="True" Font-Names="Verdana" MultipleSelect="True" 
                                    BackColor="White" Height="100%" OnContextMenuItemClick="RadTreeView1_ContextMenuItemClick" OnClientNodeChecked="treeNodeChecked" 
                                    BorderColor="#7F9DB9" TabIndex="10" > 
                                    <ContextMenus> 
                                        <telerik:RadTreeViewContextMenu runat="server" ID="RadTreeViewContextMenu1">  
                                            <Items> 
                                                <telerik:RadMenuItem runat="server" Text="Clear All Selected">  
                                                </telerik:RadMenuItem> 
                                                <telerik:RadMenuItem runat="server" Text="Expand All">  
                                                </telerik:RadMenuItem> 
                                                <telerik:RadMenuItem runat="server" Text="Collapse All">  
                                                </telerik:RadMenuItem> 
                                            </Items> 
                                        </telerik:RadTreeViewContextMenu> 
                                    </ContextMenus> 
                                </telerik:RadTreeView> 
                            </td> 
                        </tr> 
                    </table> 
                </div> 
            </ContentTemplate> 
            <Triggers> 
                <asp:AsyncPostBackTrigger ControlID="Search_ContactType" EventName="SelectedIndexChanged" /> 
            </Triggers> 
        </asp:UpdatePanel> 
        <div id="footer" runat="server" style="left: 0px;">  
            <table class="SharedEntry + NoBorder" style="width: 750px; border-right: 1px solid;  
                border-left: 1px solid; margin-top: 0; margin-bottom: 0;"> 
                <tr> 
                    <th class="noborder" style="width: 111px">  
                        Business:</th> 
                    <td> 
                        <asp:TextBox ID="Search_Business" runat="server" Width="200" TabIndex="15" MaxLength="90"></asp:TextBox>&nbsp;  
                        </td> 
                    <th class="noborder">  
                        Address Type:</th> 
                    <td style="width: 248px">  
                        <asp:DropDownList ID="Search_AddressType" runat="server" Width="205px" TabIndex="50">  
                            <asp:ListItem></asp:ListItem> 
                            <asp:ListItem Value="P">Primary</asp:ListItem> 
                            <asp:ListItem Value="S">Secondary</asp:ListItem> 
                            <asp:ListItem Value="B">Billing</asp:ListItem> 
                            <asp:ListItem>Unknown</asp:ListItem> 
                        </asp:DropDownList></td>  
                </tr> 
                <tr> 
                    <th class="noborder" style="width: 111px">  
                        First Name:</th> 
                    <td> 
                        <asp:TextBox ID="Search_First_Name" runat="server" Width="200" Font-Italic="False" 
                            TabIndex="20" MaxLength="45"></asp:TextBox></td>  
                    <th class="noborder">  
                        Address:</th> 
                    <td style="width: 248px">  
                        <asp:TextBox ID="Search_Address1" runat="server" Width="200px" Enabled="False" Font-Italic="False" 
                            TabIndex="55" MaxLength="30">Select Address Type</asp:TextBox></td>  
                </tr> 
                <tr> 
                    <th class="noborder" style="width: 111px">  
                        Last Name:</th> 
                    <td> 
                        <asp:TextBox ID="Search_Last_Name" runat="server" Width="200" TabIndex="25" MaxLength="45"></asp:TextBox></td>  
                    <th class="noborder">  
                        City:</th> 
                    <td style="width: 248px">  
                        <asp:TextBox ID="Search_City" runat="server" Width="200px" Enabled="False" Font-Italic="False" 
                            TabIndex="60" MaxLength="30">Select Address Type</asp:TextBox></td>  
                </tr> 
                <tr> 
                    <th class="noborder" style="width: 111px">  
                        TIN Number:</th> 
                    <td> 
                        <asp:TextBox ID="Search_TIN_Number" runat="server" Width="200" TabIndex="30" MaxLength="9"></asp:TextBox></td>  
                    <th class="noborder">  
                        State:</th> 
                    <td style="width: 248px">  
                        <telerik:RadComboBox ID="Search_State" runat="server" Width="205px" AppendDataBoundItems="True" 
                            EnableEmbeddedSkins="False" Skin="WindowsXP" Enabled="False" TabIndex="65">  
                            <ExpandAnimation Type="None"></ExpandAnimation> 
                            <CollapseAnimation Type="None"></CollapseAnimation> 
                        </telerik:RadComboBox> 
                    </td> 
                </tr> 
                <tr> 
                    <th class="noborder" style="width: 111px">  
                        NPI Number:</th> 
                    <td> 
                        <asp:TextBox ID="Search_NPI_Number" runat="server" Width="200" TabIndex="35" MaxLength="10"></asp:TextBox></td>  
                    <th class="noborder">  
                        Zip:</th> 
                    <td style="width: 248px">  
                           <div style="float: left">  
                        <asp:TextBox ID="Search_Zip" runat="server" Width="200px" Enabled="False" Font-Italic="False" 
                            TabIndex="70">Select Address Type</asp:TextBox> 
                            </div> 
                        <div style="float: left; margin-left: 5px; margin-top: 3px"><asp:RegularExpressionValidator ID="regexAccidentZip" runat="server" ControlToValidate="Search_Zip" 
                            Display="Dynamic" ErrorMessage="RegularExpressionValidator" ValidationExpression="_____-____|\d{5}-____|\d{5}-\d{4}|\d{5}|Select Address Type" TabIndex="-1"><img src='/SI/Images/warning16.png' alt='Enter a valid Zip Code'/></asp:RegularExpressionValidator> 
                        </div> 
                        <cc2:MaskedEditExtender id="mskextZip" runat="server" ClearMaskOnLostFocus="false" 
                            Filtered="-" Mask="99999-9999" MaskType="None" TargetControlID="Search_Zip">  
                        </cc2:MaskedEditExtender></td>  
                </tr> 
                <tr> 
                    <th class="noborder" style="width: 111px; height: 24px;">  
                        Licensed State:</th> 
                    <td> 
                        <cc3:EditTableDropDownList ID="Search_LicenseState" runat="server" RepositoryProperty="ContactLicensedStates" 
                            Width="205px" IncludeEmptyOption="True" TabIndex="40">  
                        </cc3:EditTableDropDownList> 
                    </td> 
                    <th class="noborder">  
                        County:</th> 
                    <td style="width: 248px">  
                        <telerik:RadComboBox ID="Search_County" runat="server" Width="205px" AppendDataBoundItems="True" 
                            EnableEmbeddedSkins="False" Skin="WindowsXP" Enabled="False" TabIndex="75">  
                            <ExpandAnimation Type="None" /> 
                            <CollapseAnimation Type="None" /> 
                        </telerik:RadComboBox> 
                    </td> 
                </tr> 
                <tr> 
                    <th class="noborder" style="width: 111px;">  
                        WC Territory:</th> 
                    <td > 
                        <div style="float: left">  
                            <asp:TextBox ID="Search_WC_Territory" runat="server" Width="200" TabIndex="45" MaxLength="25"></asp:TextBox> 
                        </div> 
                        <div style="float: left;margin-left: 5px">  
                            <asp:ImageButton id="Img4" runat="server" ImageUrl="/SI/Images/check.png" alt="Check" border="0" TabIndex="-1" /> 
                        </div> 
                        <div style="float: left; margin-left: 5px">  
                            <cc3:HelpImageButton ID="HelpImageButton1" runat="server" ImageUrl="/SI/Images/help.ico" 
                                CausesValidation="False" Height="20px" Width="20px" HelpTopicID="51" TabIndex="-1" /> 
                        </div> 
                    </td> 
                    <th class="noborder">  
                        PAL Territory:</th> 
                    <td style="width: 248px">  
 
                                <div style="float: left">  
                                    <telerik:RadComboBox ID="Search_PAL_Territory" runat="server" OnClientDropDownOpened="OnClientDropDownOpenedHandler" 
                                        Width="205px" ShowToggleImage="true" TabIndex="80" EnableEmbeddedSkins="False" 
                                        Skin="WindowsXP">  
                                        <Items> 
                                            <telerik:RadComboBoxItem runat="server"></telerik:RadComboBoxItem> 
                                        </Items> 
                                        <ItemTemplate> 
                                            <div id="div1">  
                                                <telerik:RadTreeView ID="palTerritoryTreeView" runat="server" OnClientNodeClicking="nodeClicking" CheckBoxes="false">  
                                                    <Nodes> 
                                                    </Nodes> 
                                                </telerik:RadTreeView> 
                                            </div> 
                                        </ItemTemplate> 
                                        <ExpandAnimation Type="None" /> 
                                        <CollapseAnimation Type="None" /> 
                                    </telerik:RadComboBox> 
                                    </div> 
                                <div style="margin-left: 5px; float: left">  
                                    <cc3:HelpImageButton ID="HelpImageButton2" runat="server" ImageUrl="/SI/Images/help.ico" 
                                        CausesValidation="False" Height="20px" Width="20px" HelpTopicID="52" TabIndex="-1"/>  
                                </div> 
 
                    </td> 
                </tr> 
                </table> 
                <table class="SharedEntry + NoBorder" style="width: 750px; border-right: 1px solid;  
                border-left: 1px solid; border-bottom: 1px solid; margin-top: 0; margin-bottom: 0;"> 
                  
                <tr> 
                    <td colspan="4">  
                        <table border="0" width="100%">  
                            <tr> 
                                <td align="left" width="20%" style="height: 26px">  
                                    <asp:LinkButton ID="lnkHome" runat="server" Font-Size="Medium" Text="Claim Contacts" 
                                        Visible="False" TabIndex="-1"></asp:LinkButton></td>  
                                <td class="center" width="60%" style="height: 26px">  
                                    <asp:Button ID="btnSearch" runat="server" Text="Search" Width="64px" TabIndex="85" /> 
                                    <asp:Button ID="btnClear" runat="server" Text="Clear" Width="64px" TabIndex="90" /></td>  
                                <td align="right" width="20%" style="height: 26px">  
                                    </td> 
                            </tr> 
                        </table> 
                        </td> 
                </tr> 
                </table> 
              
        </div> 
    </div> 
Yana
Telerik team
 answered on 11 Dec 2009
1 answer
94 views
Here is a brief description of the problem. A RadWindow is invoked from a page that has a master page. On the master page a RadMenu exists. When the RadWindow is invoked in Modal, the controls on page behind it are 'disabled' as expected however, the RadMenu is still active (enabled). Is there a way to get this menu to perform like the rest of the controls on the page with RadWindow is Modal and then set back enabled once the RadWindow is closed? Some of the difficulty involved is that the RadWindow uses the same master page for look and feel purposes. I can of course manipulate the controls in the RadWindow as they relate to the master page but not on the page that invoked the RadWindow. Thanks in advance for any insight into the issue.
Georgi Tunev
Telerik team
 answered on 11 Dec 2009
1 answer
102 views
Hi Everyone,

Has anybody seen a demo or forum post that might help me out with this issue?

What I'm looking to do is to have a RadGrid with in-line editing.  I have three columns, "Category", "Question", and "Answer", which I'd like to use drop down lists for.

However, what I'm looking to do is when a "Category" is selected, to repopulate the drop down list of "Questions".  Also, when a "Question" is selected, I'd want to repopulate the drop down for "Answers"

I checked out the demo here:  Grid / Automatic Operations and this is close to what I'm looking for, however it does not have the hierarchical drop downs.

Any ideas/comments/suggestions would be greatly appreciated.
Jason
Top achievements
Rank 1
 answered on 11 Dec 2009
4 answers
198 views

Hi All, 

I have an hierarchical grid with 3 levels (MasterTableView and 2 DetailTables) and <telerik:GridClientSelectColumn /> in the inner  most view.
I want to export only those rows selected in the inner most view along with their parent view rows.
Could not find a solution to get the selected rows ids and export only the selected. Please help me to point to the right resource to resolve the issue. Thanks.

 

Pavlina
Telerik team
 answered on 11 Dec 2009
3 answers
110 views
I've got a combo box in a user control and the scrollbars don't appear using FF on a mac. I'm using the black skin and it appears to work ok via the online demos site... Anything I should look at if it's in a user control?
Simon
Telerik team
 answered on 11 Dec 2009
3 answers
243 views
I am trying to use both the AutoComplete and LoadOnDemand features of the RadComboBox. I have a huge list of popular bands (about 20,000 entries in the database), and I want users to be able to select multiple items from the list by typing a few characters of the band's name.

Please help!

Thanks
Paul


The code I have now is:

<telerik:RadComboBox runat="server" ID="radSimilarArtists" EnableLoadOnDemand="true"
                            EnableVirtualScrolling="true" EnableTextSelection="true" Width="300" MarkFirstMatch="True"
                            AutoCompleteSeparator="," ShowMoreResultsBox="true" AllowCustomText="false" ShowDropDownOnTextboxClick="false"
                            OnItemsRequested="radSimilarArtists_ItemsRequested" Skin="Default" />

And the code behind

  protected void radSimilarArtists_ItemsRequested(object o, RadComboBoxItemsRequestedEventArgs e)
    {
        MegaService megaClass = new MegaService();
        string textEntered = e.Text;


        DataTable data = megaClass.getSimilarArtists(textEntered).Tables["similarartists"];
        int itemOffset = e.NumberOfItems;
        int endOffset = Math.Min(itemOffset + ItemsPerRequest, data.Rows.Count);
        e.EndOfItems = endOffset == data.Rows.Count;

        for (int i = itemOffset; i < endOffset; i++)
        {
            radSimilarArtists.Items.Add(new RadComboBoxItem(data.Rows[i]["name"].ToString(), data.Rows[i]["id"].ToString()));
        }

        e.Message = GetStatusMessage(endOffset, data.Rows.Count);
    }
    private static string GetStatusMessage(int offset, int total)
    {
        if (total <= 0)
            return "No matches";

        return String.Format("Items <b>1</b>-<b>{0}</b> out of <b>{1}</b>", offset, total);
    }
Simon
Telerik team
 answered on 11 Dec 2009
5 answers
152 views
Hi! I have RadComboBox inside an UpdatePanel. On its selected index change event, i populate other controls inside same update panel and that works fine. But when I make selection from popup window (using ajax control toolkit and modal popup extender), same set of controls (radcombobox too) should be populated, but in that moment (when popup is closed) my combobox is not populated and it's shown only a small part of it.
<asp:UpdatePanel ID="upPartner" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">  
    <ContentTemplate> 
        <table id="tblMain" runat="server" style="width: 100%;" cellpadding="0" cellspacing="0">  
            ...  
            <tr> 
               <td style="width: 75%;">  
                                  
                                <telerik:RadComboBox ID="comboName" runat="server" AllowCustomText="true" Width="75%" 
                                    AutoPostBack="true" Skin="Vista" OnSelectedIndexChanged="comboName_SelectedIndexChanged">  
                                    <ItemTemplate> 
                                        <asp:Label ID="lblItemText" runat="server" CssClass="StandardInput"></asp:Label> 
                                    </ItemTemplate> 
                                </telerik:RadComboBox> 
                            </td> 
                        </tr> 
...  
</ContentTemplate> 
</asp:UpdatePanel> 

I don't know what causes that, update panel or ajax control toolkit or something else?
Thanks, Ana
Simon
Telerik team
 answered on 11 Dec 2009
4 answers
283 views
I am using the RADcombobox for the autosuggest feature. I have a webservice with a webmethod, say, 'MyMethod' which is being used to populate the combobox with the auto suggested values.

If I type something in the Radcombobox input area, the webmethod is called. If I try to navigate away from this page by clicking any other links or buttons on this page, before the webmethod returns with values, I get an error - "Server Method MyMethod failed".

No other error messages. Please advise.
Simon
Telerik team
 answered on 11 Dec 2009
1 answer
133 views
In the Application_Error event of my global.asax I log all untrapped errors and then redirect to an error page.  I need to know whether the page that threw the error is a rad window?  If it is I'll handle it differently. 
So in my case I have
Form1.aspx which does a javascript:window.radopen("popup.aspx", "Popup").  It's the Popup that throws the error.  How can I tell in the application_error event that this was thrown from a radopen?
Georgi Tunev
Telerik team
 answered on 11 Dec 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?