Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
120 views
Hello,
I have a problem using RadComboBox with the ItemChecked event when a validator is present on the page. ComboBox has the CausesValidation property set to false. Checkboxes work correctly, however clicking on the item label does not check the item and after a while results in timeout error:
Error: Sys.WebForms.PageRequestManagerTimeoutException: The server request timed out.

Following is the demo page:

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="rsmMain" runat="server" EnablePageMethods="true" EnableScriptGlobalization="true" EnablePartialRendering="true" />
    <div>

      <asp:TextBox runat="server" ID="tbInput" /><asp:RequiredFieldValidator ID="rfvInput" runat="server" ControlToValidate="tbInput" ErrorMessage="Error" />
      <asp:UpdatePanel ID="upActivitySelector" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
        <ContentTemplate>
          <telerik:RadComboBox runat="server" ID="cbTest" AutoPostBack="true" CausesValidation="false" CheckBoxes="true">
            <Items>
              <telerik:RadComboBoxItem Text="test1" />
              <telerik:RadComboBoxItem Text="test2" />
            </Items>
          </telerik:RadComboBox>
        </ContentTemplate>
      </asp:UpdatePanel>
    
    </div>
    </form>
</body>
</html>

public partial class RadComboBoxTest : System.Web.UI.Page {
    protected void Page_Init(object sender, EventArgs e) {
      cbTest.ItemChecked += new RadComboBoxItemEventHandler(selector_ItemChecked);
    }

    protected void selector_ItemChecked(object sender, RadComboBoxItemEventArgs e) {  }

  }



John
Top achievements
Rank 1
 asked on 04 Mar 2014
1 answer
207 views
I'm using the below markup to create a Combox that has a Header Template.  I have a potential 10000+ records so I'm using LoadOnDemand to populate the rows BUT I would like to be able to populate the HEADER labels immediately.  See the second code snippet..

The code to fire the GetTranslation is currently ignored but I've also tried the below in Init, PreRender, ItemsCreated, in all cases its either too early or in ItemsCreated, it only fires once I actually start type, which is too late.

Dim HeaderCommitmentNumber As Label = DirectCast(e.Item.FindControl("lblCommitmentNumber"), Label)
Dim HeaderVendor As Label = DirectCast(e.Item.FindControl("lblVendor"), Label)
 
HeaderCommitmentNumber.Text = MasterPage.GetTranslation("Number", False)
HeaderVendor.Text = MasterPage.GetTranslation("VendorDescription", False)


<telerik:RadComboBox ID="CommitmentNumber" runat="server" Width="100px" Height="200" DropDownWidth="450"
                               EnableLoadOnDemand="true" ItemsPerRequest="10" DataTextField="ReferenceDocumentNumber" HighlightTemplatedItems="true"
                               ExpandDelay="0" ExpandAnimation-Duration="0" CollapseAnimation-Duration="0" CollapseDelay="0" LoadingMessage='<%#MasterPage.GetTranslation("Loading", False)%>' >
                               <HeaderTemplate>
 
                                   <div style="width: 420px;">
                                       <div style="width: 75px; float: left; padding: 0 11px 0 11px; color: rgb(0, 21, 110) !important;">
                                           <asp:Label ID="lblCommitmentNumber" runat="server" Text='<%#MasterPage.GetTranslation("Number", False)%>' Font-Bold="true" />
                                       </div>
                                       <div style="width: 295px; float: left; padding: 0 11px 0 11px; color: rgb(0, 21, 110) !important;">
                                           <asp:Label ID="lblVendor" runat="server" Text='<%#MasterPage.GetTranslation("VendorDescription", False)%>' Font-Bold="true" />
                                       </div>
                                   </div>
                               </HeaderTemplate>
                               <ItemTemplate>
                                   <ul>
                                       <li>
                                           <!-- Row -->
                                           <ul>
                                               <li id="col1">
                                                   <div style="width: 75px; float: left; padding: 0 11px 0 11px; color: rgb(0, 21, 110) !important;">
                                                       <asp:Label ID="ReferenceDocumentNumber" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "ReferenceDocumentNumber").ToString()%>'></asp:Label>
                                                   </div>
                                               </li>
                                               <li id="col2">
                                                   <div style="width: 295px; float: left; color: rgb(0, 21, 110) !important; margin-left: 5px;">
                                                       <div>
                                                           <asp:Label ID="lblVendor" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Vendor").ToString()%>'></asp:Label>
                                                       </div>
                                                       <div>
                                                           <asp:Label ID="lblVendorDesc" runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "Description").ToString()%>'></asp:Label>
                                                       </div>
                                                   </div>
                                               </li>
                                           </ul>
                                       </li>
                                       <!-- End of row -->
                                   </ul>
                               </ItemTemplate>
                           </telerik:RadComboBox>
Nencho
Telerik team
 answered on 04 Mar 2014
1 answer
257 views
I am using RadTabstrip Control in my Sharepoint Project. In my page i have RadMultiPage control in that i have 5 tabs for them i am using 5 RadPageView in each Radpageview i place the user controls each control  have some forms in that i have button controls. These button controls i am using for data insertion as well as navigate the control from one page to another page here i am unable to get that functionality here is my code please look at it. what is the problem in my code

my.ascx code
<telerik:RadTabStrip ID="RadTabStrip1" runat="server" MultiPageID="RadMultiPage1" Skin="Silk">
    <Tabs>
        <telerik:RadTab runat="server" Text="Case Details" ToolTip="Case Details">
        </telerik:RadTab>
        <telerik:RadTab runat="server" Text="Party Details" ToolTip="Party Details">
        </telerik:RadTab>
        <telerik:RadTab runat="server" Text="Legal Practitioner Details" ToolTip="Legal Practitioner Details"></telerik:RadTab>
        <telerik:RadTab runat="server" Text="Document Details" ToolTip="Document Details"></telerik:RadTab>
        <telerik:RadTab runat="server" Text="Summary" ToolTip="Summary"></telerik:RadTab>
    </Tabs>
</telerik:RadTabStrip>
<telerik:RadMultiPage ID="RadMultiPage1" runat="server">
    <telerik:RadPageView ID="RadPageView1" runat="server">
       <UC:CaseInfo ID="CaseDetailsControl" runat="server" />
    </telerik:RadPageView>
    <telerik:RadPageView ID="RadPageView2" runat="server" Width="100%">
        <UC:PartyInfo ID="PartyInfoControl" runat="server" />
    </telerik:RadPageView>
    <telerik:RadPageView ID="RadPageView3" runat="server" Width="100%">
       <UC:LegalPractitionerDetails ID="LegalPractitionerControl" runat="server" />
     </telerik:RadPageView>
    <telerik:RadPageView ID="RadPageView4" runat="server" Width="100%">
    <UC:UploadDocuments ID="UploadDocumentsControl" runat="server" />
    </telerik:RadPageView>
    <telerik:RadPageView ID="RadPageView5" runat="server" Width="100%">
     <UC:CaseSummary ID="CaseSummaryControl" runat="server" />
    </telerik:RadPageView>
</telerik:RadMultiPage>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default"
    Transparency="1">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadTabStrip1">
            <UpdatedControls>
               
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnCaseInfoNext">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnPartyInfoNext">
            <UpdatedControls>
             
                <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnLpNext">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnUploadDocumentsNext">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
        <telerik:AjaxSetting AjaxControlID="btnCaseSummarySubmit">
            <UpdatedControls>
               <telerik:AjaxUpdatedControl ControlID="RadMultiPage1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>                                     
In the above  code i am not added below code because in my master page i included that script manager
 <telerik:RadScriptManager ID="radAjaxScriptManager1" runat="server">
    </telerik:RadScriptManager>
The following snippet used for the button click event to navigate the tab from one page to another

                   RadTabStrip tc = null;
                    System.Web.UI.WebControls.Literal ltMetaTags = null;
                    Control ctl = this.Parent.Parent;
                    tc = (RadTabStrip)ctl.FindControl("RadTabStrip1");
                    if (tc != null)
                    {
                        tc.TabIndex = 1;
                        tc.SelectedIndex = 1;
                        GoToNextTab();
                        GoToNextPageView();
                    }
        private void GoToNextTab()
        {
            RadTabStrip tabStrip = (RadTabStrip)this.NamingContainer.FindControl("RadTabStrip1");
            RadTab PartyDetailsTab = tabStrip.FindTabByValue("PartyDetails");
            PartyDetailsTab.Enabled = true;
            PartyDetailsTab.SelectedIndex = 1;
            PartyDetailsTab.Selected = true;
            
        }
        private void GoToNextPageView()
        {
            RadMultiPage multiPage = (RadMultiPage)this.NamingContainer.FindControl("RadMultiPage1");
            RadPageView PartyDetailsPageView = multiPage.FindPageViewByID("RadPageView2");
            PartyDetailsPageView.TabIndex = 1;
            PartyDetailsPageView.Selected = true;
          
        }
what is the problem in my code i can't understand please help me from this problem i am struggling for this problem from 3 days. and also i need how to load only selected tab data only when i select tab no need to load all the data in remaining tabs.









Nencho
Telerik team
 answered on 04 Mar 2014
1 answer
140 views
hi,

here is my listview

 <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
<telerik:RadTextBox ID="txtDSTableLike" runat="server" EmptyMessage="Table Like" OnTextChanged="txtDSTableLike_TextChanged"></telerik:RadTextBox>
                                </div>
                                <div class="table-selection-list">
                                    <div id="content_1_1" class="contents_1">
                                        <telerik:RadListView ID="lvDSTableSelection" runat="server" AllowMultiItemSelection="true" OnSelectedIndexChanged="lvDSTableSelection_SelectedIndexChanged" autopostback="false">

                                            <ItemTemplate>
                                                <asp:LinkButton ID="LinkButton1" CssClass="selectedButtons" runat="server" CommandName="Select" Font-Underline="false">
                                                <p ><%# Container.DataItem %></p></asp:LinkButton>
                                            </ItemTemplate>
                                            <SelectedItemTemplate >
                                                <p ><%# Container.DataItem %></p>
                                            </SelectedItemTemplate>
</telerik:RadListView>
</telerik:RadAjaxPanel>



First of all Icall this function and SelectedItems returns selected data perfectly

        protected void lvDSTableSelection_SelectedIndexChanged(object sender, EventArgs e)
        {
..

            orcl.Owner = ddDSSchema.SelectedText;
            orcl.TableName = lvDSTableSelection.SelectedItems[0].DataItem.ToString(); --> returns selected data perfectly
            var result = client.GetColumnNames(orcl);

            lbDSNominal.DataSource = result.Data;
            lbDSNominal.DataBind();
        }

after I call above function, I call this function but now SelectedItems  return null

 protected void btnNext_Click(object sender, EventArgs e)
        {

            developmentSample.TableName = lvDSTableSelection.SelectedItems[0].DataItem.ToString(); --> return null at selected item
}

how can I fix it? Why am I losting selecteditem ?




Viktor Tachev
Telerik team
 answered on 04 Mar 2014
6 answers
273 views
I have a RadGrid with several columns. Some of them have comboboxes and some of them have textboxes as filter input. If I first filter using one item from Combobox, such as state "Florida" and then I try to filter again using the textbox and input a searchable word it works fine and bring me the result. However if the word is not searchable I get the error below.
Eyup
Telerik team
 answered on 04 Mar 2014
4 answers
165 views
Hello,

I've a serious problem with RadComboBox

When Filtering RadComboBox  IE 9 , it works fine actually with markfirstmatch property and i could filter with more than one character
For example if i am filtering Combobox to find item with name "AmrRafat", i could write 'amr' and the combobox will do the rest and finds this item.

but when trying the same scenario in IE 11, it only accepts the first character and each time i am pressing a key it consider it as the first character for filtering
For example if i am filtering Combobox to find item with name "AmrRafat", and i tried to write 'amr' Then Combobox will assume only one character and filter with it

.aspx File

<telerik:RadComboBox ID="cmbPayers" runat="server" Width="100%"  AutoPostBack="true" Filter="Contains"  MarkFirstMatch="true" TabIndex="11" OnSelectedIndexChanged="cmbPayers_SelectedIndexChanged"></telerik:RadComboBox>

Any Ideas?
Nencho
Telerik team
 answered on 04 Mar 2014
1 answer
126 views
Dear Sir

I have problem on splitter in User control. 

I use radgrid and pop up a user control (ucA) for editing. In this  user control(uc A), I have another user control (ucB) which have a radsplitter as top level. 

I tried wrap a div with width and height in percentage or px to ucB in ucA, The radsplitter rendered with wrong width and height.  it totally ignores the Div in ucA.

When I can the client page of source code, I fount it sets the width to the radgrid width. 

Summary: the radsplitter in user control can't response the host width.

Please let me know how to solve this.

Thank you very much.

Jason

Vessy
Telerik team
 answered on 04 Mar 2014
3 answers
153 views
I have setup a simple vertical splitter.  When I change the size of the browser window, the width of the splitter follows the width of the browser window as I intended.

How do I do the same with the height?  I can set the height of the splitter to 100% but I am only permitted to set the height of each pane in pixels and not in %.

<!DOCTYPE html>
<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>
            <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">
        // Script here
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
    <div style="height:100%">
 
        <telerik:RadSplitter ID="RadSplitter1" Runat="server" Height="100%"
            Skin="WebBlue" Width="100%" LiveResize="True">
            <telerik:RadPane ID="RadPane1" Runat="server" Width="30%" Height="300px"
                ContentUrl="http://activeminds.ca" Scrolling="None">
            </telerik:RadPane>
            <telerik:RadSplitBar ID="RadSplitBar1" Runat="server">
            </telerik:RadSplitBar>
            <telerik:RadPane ID="RadPane2" Runat="server">
                Test content
            </telerik:RadPane>
        </telerik:RadSplitter>
 
    </div>
    </form>
</body>
</html>
Vessy
Telerik team
 answered on 04 Mar 2014
1 answer
300 views
I have an asp.net drop down list. There is a "new" option in it. Selecting that will show 2 labels,2 text boxes and an asp.net button. Entering values in the textboxes("John","Doe")and hitting the button should add a value to the Database table and also refresh this drop down and . It did that when I DID NOT use ajax. Now when i use ajax (radajaxmanager), it adds the value to the table and shows that it is selecting the newly added value in the codebehind, but the drop down selected value shows as "New". It should say for example "John Doe". I went for ajax because I have many drop downs in the page and postbacks were not optimal.  Where did I go wrong?

<telerik:RadAjaxManager ID="ram" runat="server"><br>        <AjaxSettings><br>            <telerik:AjaxSetting AjaxControlID="ddlCustomerContact"><br>                <UpdatedControls><br>                    <telerik:AjaxUpdatedControl ControlID="divAddNewCustomerContact"/><br>                </UpdatedControls>
 </telerik:AjaxSetting>
</AjaxSettings>
        </telerik:RadAjaxManager>

In the codebehind  I write a method BindCustomerContact() after I add "John Doe". 

 If intNewCustomerID > 0 Then<br>            ddlCustomerContact.SelectedValue = intNewCustomerID<br>        Else<br>            ddlCustomerContact.SelectedIndex = 0<br>        End If<br>...

When I debugged it set the value of the drop down as the new value, but my UI shows "New". Any help would be appreciated.
Princy
Top achievements
Rank 2
 answered on 04 Mar 2014
1 answer
518 views
I have a RadDropDownTree and a RadTreeView on the same page.  Basically, a list of messages are being loaded on the page when a category is selected.  The layout of this app requires that the treeview be displayed in a dropdown instead of the traditional treeview.  Since I already have the radtreeview successfully executing all of the code I want it to when a node is selected, I was hoping to fire that code when a selection is made on the raddropdowntree.  Right now, I have some code in javascript which causes a category to get selected in the radtreeview whenever the same cayegory is selected in the raddropdowntree.  However, it seems that the radtreeview node is getting selected with this code, but it is not getting clicked.  The messages do not get loaded the same way they would if someone were to explicitly click on the radtreeview node.

Here is my javascript which causes the readtreeview category to get selected when the same raddropdown is selected.  Does anyone know how I can make it not just select the node, but also click on the node?

<script type="text/javascript">
        function OnClientDropDownClosed1(sender, eventArgs) {
            var tree = $find("ctl00_MainContent_MessageList1_MessageFilter1_RadDropDownTree1");
            var entries = tree.get_entries();
            var selectedText = tree.get_selectedText();
            document.getElementById("ctl00_MainContent_CategoryTree1_hfCategoryNum").value = selectedText;
 
            SelectNode(selectedText);
 
        }
 
        function SelectNode(nodeName) {         
            var tree = $find("ctl00_MainContent_CategoryTree1_TreeViewDirectory");
            var node = tree.findNodeByText(nodeName);
            tree.trackChanges();  
            node.set_selected(true);           
            tree.commitChanges();           
               
        }
 
</script>
 
Shinu
Top achievements
Rank 2
 answered on 04 Mar 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?