Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
61 views
There is a Telerik Rad Combobox which has three events.
OnClientItemRequesting,OnClientItemRequested,OnClientKeyPressing. All the above three events is calling a JS function.

In case of Chrome and Firefox all the three events gets fired on key press and autocomplete opens
In case of all IE only OnClientKeyPressing fire and autcomplete doesn't open

The page doctype is HTML5

Please provide a solution to the above problem

Thanks.
Shinu
Top achievements
Rank 2
 answered on 19 Aug 2014
5 answers
146 views
Is there a method to have the toolbar wrap similar to the menu ?
Ivan Zhekov
Telerik team
 answered on 19 Aug 2014
1 answer
140 views
Hi

I'm using Radgrid to build a tree structure with source of objects with parent and child relationship.
I'm also have a ddl in my page.
Each time I change my selection in the ddl I need to load differnet data to my radgrid.
The problem is the when I change the ddl and one of the node is expanded to more that 1 level I got error:

Specified argument was out of the range of valid values.
Parameter
name: ItemHierarchicalIndex Description:
An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: ItemHierarchicalIndex

Source
Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the
exception can be identified using the exception stack trace below.

I guess the problem is- the grid is trying to restore the expanded items on the new data source (which has been changed and the expanded levels in client data may not be valid anymore).

Can u help me with solution?
thanks




Angel Petrov
Telerik team
 answered on 19 Aug 2014
1 answer
151 views
Hello,
I want to catch the clicked menu to know de url user has clicked and validate before send this,

protected void RadMenu1_ItemClick(object sender, Telerik.Web.UI.RadMenuEventArgs e)
    {
       string myitme = RadMenu1.SelectedItem.ToString();

        if (e.Item.Text == "Autorizar")
        {
  
            Response.Write("You has selected Autorizar, You will be redirected to Autorizar.html");
            Response.Redirect("Autorizar.html");
        }
}

Anyone knows how can I do this?
Shinu
Top achievements
Rank 2
 answered on 19 Aug 2014
3 answers
178 views
Hi All,

i have designed my webpage with a raddropdowntree and a RadComboBox . when im clicking on that raddropdowntree , 'EntryAdded' event will fire and a RadComboBox will load. In this event , the page will be blinking. So that i have trying to avoid that. if i will use RadAjaxManager means, the RadDropDownTree  canot be load and accessible. Anybody tell me the solution that, how to avoid flickering  using Rad in webpage while postback. below is the sample code.
<rad:RadAjaxManager ID="RadAjaxManager1" runat="server">
    <AjaxSettings>
       <rad:AjaxSetting AjaxControlID="rddtArea">
            <UpdatedControls>
                <rad:AjaxUpdatedControl ControlID="rcmbName">
            </UpdatedControls>
        </rad:AjaxSetting>
    </AjaxSettings>
</rad:RadAjaxManager>
<rad:RadSplitter runat="server" ID="RadSplitter1" Width="100%" BorderSize="0" BorderStyle="None"
    PanesBorderSize="0" Height="100" Orientation="Horizontal">
    <rad:RadPane ID="RadPane1" runat="server" Height="100%">
   <rad:RadDropDownTree ID="rddtArea" runat="server" DropDownSettings-CloseDropDownOnSelection="true"
                        OnEntryAdded="rddtArea_EntryAdded" EnableFiltering="true" FilterSettings-Highlight="Matches"
                        Skin="Outlook" DropDownSettings-Height="100" AutoPostBack="true">
                    </rad:RadDropDownTree>
  <rad:RadComboBox ID="rcmbworkflowtemplate" runat="server" DataValueField="MOCID"
                        AppendDataBoundItems="false" DataTextField="MOCTitle" AutoPostBack="true" OnSelectedIndexChanged="rcmbworkflowtemplate_SelectedIndexChanged">
                  </rad:RadComboBox>
  </rad:RadPane>
</rad:RadSplitter>












Princy
Top achievements
Rank 2
 answered on 19 Aug 2014
6 answers
278 views
Hi,
I am using Telerik Rad Ajax Controls  2013 Q1 NET 40 for our website, Technologies, ASP.NET, VB.

I have a .aspx page with a ajaxified RadPanelBar. There is a RadPanelItem in RadPanelBar which contains controls such as texboxes, combo boxes etc. HTML Tables are used to show controls/fields in each panel. The RadPanelBar is ExpandMode="MultipleExpandedItems". I have a RadAJXManager for the panelbar.

The RadPanelItem has a cascading combo, so the first combox "Manufacture" on select populates the second Combo "Model. I have set a OnSelectedIndexChanged="ddManufacturer_SelectedIndexChanged" to call a code behind code, which correctly populates the Model Combo. The problem I have is that once the Model combo has been populated, the PanelBarItem which was expanded seems to collapse after the postback.
 
Here is a aspx code:
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="RadPanelBar1">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="RadPanelBar1" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
</telerik:RadAjaxManager>
    <telerik:RadPanelBar ID="RadPanelBar1" Runat="server"  Skin="Office2007" ExpandMode="MultipleExpandedItems"
                style="margin-right: 80px" Width="90%" PersistStateInCookie="true">
        <Items>                
             <telerik:RadPanelItem runat="server" Text="Device Details">
                 <Items>
                    <telerik:RadPanelItem Value="DeviceDetails" runat="server"  PreventCollapse="false" Text="Device Details">
                         <ItemTemplate>
                             <div class="qsf-fb">
                                 <table  cellspacing="10">                                
                                   <tr>
                                         <td>
                                            <asp:Label runat="server" ID="Label20" AssociatedControlID="ddManufacturer">*Manufacturer:   </asp:Label>
                                         </td>
                                         <td>
                                             <img alt="Help" src="../Images/help.gif" title="Not Required if Work Authorization = Decommission or TADD4d Exlusion = No,Optional if                                                                 Work Authorization = Changes with Rename/Changes without Rename." />

                                               <telerik:RadComboBox ID="ddManufacturer" runat="server" DataSourceID="SqlZurichManufacture"
                                                            DataTextField="ADCSManufacture" DataValueField="ADCSManufacture"
                                                            Skin="Office2007" CausesValidation="False" Width="220px" MarkFirstMatch="True"
                                                            OnSelectedIndexChanged="ddManufacturer_SelectedIndexChanged"
                                                            AutoPostBack="True" EmptyMessage="Please Select..." EnableScreenBoundaryDetection="False">
                                               </telerik:RadComboBox>  
                                        </td>                                    
                                         <td>
                                             <asp:Label runat="server" ID="Label68" Visible="False" AssociatedControlID="ddManufacturer">*Manufacturer:   </asp:Label>
                                         </td>
                                        <td>
                                              <telerik:RadTextBox  ID="txtManufacture" CssClass="textInput" ValidationGroup="RefValidation" MaxLength="30" Skin="Office2007"
                                                     runat="server"  Width="220px" Visible="False"></telerik:RadTextBox>
                                                 <asp:RequiredFieldValidator runat="server"  ID="RequiredFieldValidator43"
                                                      ControlToValidate="txtManufacture" ErrorMessage="Manufacture is required" Text="*"></asp:RequiredFieldValidator>
                                         </td>
                                    </tr>
                                    <tr>
                                          <td>
                                            <asp:Label runat="server" ID="Label27" AssociatedControlID="ddModel">*Model:   </asp:Label>
                                         </td>
                                         <td>
                                             <img alt="Help" src="../Images/help.gif" title="Not Required if Work Authorization = Decommission or TADD4d Exlusion = No,Optional if Work Authorization = Changes with Rename/Changes without Rename." />
                                            <telerik:RadComboBox ID="ddModel" runat="server"
                                                            DataTextField="ADCSModel" DataValueField="ADCSModel" 
                                                            Skin="Office2007" CausesValidation="False" Width="220px" MarkFirstMatch="True"
                                                            AutoPostBack="True" EmptyMessage="Please Select..." EnableScreenBoundaryDetection="False">
                                               </telerik:RadComboBox>
<%--                                             <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="ddModel"
                                                    Display="Dynamic" ErrorMessage="Sub-Business Unit is Required. Please select from dropdown." Font-Names="Cambria"
                                                    Font-Size="small" InitialValue="Please Select...">
                                             </asp:RequiredFieldValidator>--%>
                                         </td>
                                         <td>
                                            <asp:Label runat="server" ID="Label65" Visible="False" AssociatedControlID="ddManufacturer">*Manufacturer:   </asp:Label>
                                         </td>
                                          <td>
                                              <telerik:RadTextBox  ID="txtModel" CssClass="textInput" ValidationGroup="RefValidation" MaxLength="30" Skin="Office2007"
                                                     runat="server"  Width="220px" Visible="False"></telerik:RadTextBox>
                                                 <asp:RequiredFieldValidator runat="server"  ID="RequiredFieldValidator1"
                                                      ControlToValidate="txtModel" ErrorMessage="Model is required" Text="*"></asp:RequiredFieldValidator>
                                         </td>
                                     </tr>                            
                             </table>
                             </div>
                        </ItemTemplate>
                   </telerik:RadPanelItem>
                </Items>
            </telerik:RadPanelItem>                                                                                                                                                                                                                                               </Items>
            </telerik:RadPanelItem>
        </Items>
        <ExpandAnimation Type="InOutBounce" />
    </telerik:RadPanelBar>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               Here is the code behind code the the cascading combo in the RadPanelBarItem, but this does work perfectly:     

Protected Sub
        ddManufacturer_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs)
        Dim editedItem As GridEditableItem = TryCast(TryCast(o, RadComboBox).NamingContainer, GridEditableItem)

        ' If 'Other' selected from Manufacture then show text box to allow typing in a value
        If e.Value = "Other" Then
            Dim txtManfu As RadTextBox = DirectCast(RadPanelBar1.FindItemByValue("DeviceDetails").FindControl("txtManufacture"), RadTextBox)
            Dim txtModel As RadTextBox = DirectCast(RadPanelBar1.FindItemByValue("DeviceDetails").FindControl("txtModel"), RadTextBox)
            txtManfu.Visible = True
            txtModel.Visible = True
        End If
        Dim ddModel As RadComboBox = DirectCast(RadPanelBar1.FindItemByValue("DeviceDetails").FindControl("ddModel"), RadComboBox)

        ddModel.Items.Clear()
        ddModel.DataSource = LoadModel(e.Value)
        ddModel.DataBind()

        Dim Panel1 As RadPanelItem = New RadPanelItem
        Panel1 = RadPanelBar1.FindItemByValue("DeviceDetails")
        '.FindItemByValue("ActivityInformation")
        If Panel1.Expanded = False Then
            Panel1.Expanded = True
            Panel1.Enabled = True
            Panel1.Selected = True
        End If
    End Sub                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             To summarize, the RadPanelbar collapses after a postback. Do I need to ajaxify the controls inside the panelbaritem?   I have tried several ideas like setting the PersistStateInCookies to true. Also tried to capture the collapse in the RadPanelBar PreRender    to stop the collapse and other ideas from this forum. Any suggestions would be appreciated. Thank you.
                                                                                








Ed
Top achievements
Rank 1
 answered on 18 Aug 2014
4 answers
109 views
I am trying to get the autocompletebox to not select any results from the drop down list of values. It seems as soon as any results are displayed the first result is always selected by default so if you hit enter or click a button to process it will ignore any part string you may have there and instead take the selected value.

I would like the autocompletebox to act more like the google search box for example where no value is selected by default and will instead take your inputted string as the default value.

I have tried using the clientside API to no avail to deselect the item.

Any help would be appreciated.
Jeff
Top achievements
Rank 1
 answered on 18 Aug 2014
3 answers
169 views
Hello everyone,

I am using a radGrid to display records of data. I am attempting to implement a RadDropDownList that will alter the displayed data in radGrid based on the value selected. The dropDown list correctly rebinds the data and displays the new set of information. My problem occurs when the user attempts to move to a different page or attempts to sort the information. The grid is rebound to the original dataSource and does not maintain the dropDown selected dataSource. What is the best way to maintain the correct dataSource through page postbacks?

DropDown ASPX:
<telerik:RadDropDownList ID="BatchRadDropDownList" runat="server" OnItemSelected="BatchNameSelected"
    AutoPostBack="true" DefaultMessage="- Batch Names -">
</telerik:RadDropDownList>

RadGrid NeedDataSource:
protected void RadGridActionItem_NeedDataSource(object sender, GridNeedDataSourceEventArgs e)
{
    // Provides RadGrid with Action Item data.
 
    List<IDataParameter> Parms = null;
    string SQL = string.Empty;
    DataTable dt;
 
    try
    {
        using (DataAccess da = new DataAccess())
        {
            SQL = COMPLIANCE_SQL.GET_ALL_NEW_ACTION_ITEMS();
            dt = da.GetDataSet(SQL, Parms).Tables[0];
            RadGridActionItem.DataSource = dt;
        }
    }
    catch (Exception ex)
    {
        throw ex;
    }
}

BatchNameSelected (Rebind of DataSource to selected data):
protected void BatchNameSelected(object sender, DropDownListEventArgs e)
        {
            List<IDataParameter> Parms = null;
            string SQL = string.Empty;
            DataTable dt;
 
            try
            {
                // Query for batch names and bind data to Batch RadDropDownList.
                using (DataAccess da = new DataAccess())
                {
                    SQL = COMPLIANCE_SQL.GET_ACTION_ITEM_VIA_BATCH_NAME(ref Parms, e.Text);
                    dt = da.GetDataSet(SQL, Parms).Tables[0];
                    RadGridActionItem.DataSource = dt;
                    RadGridActionItem.Rebind();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

RadGrid PageIndexChanged:
protected void RadGridActionItem_PageIndexChanged(object sender, GridPageChangedEventArgs e)
{
    // Allows for RadGrid paging property.
    RadGridActionItem.CurrentPageIndex = e.NewPageIndex;
}


Page_Load:
protected void Page_Load(object sender, EventArgs e)
{
    FillBatchDropDown();
}

Question: How do I maintain the selected DataSource through postbacks caused by paging and sorting?

I have been unable to find a solution that pertains to my example and would appreciate any help I can get.

Thanks,
Matt
Matthew
Top achievements
Rank 1
 answered on 18 Aug 2014
3 answers
104 views
I have set DisplayUpFolderItem to true in my projects...But it is not working.
I have used AssemblyQualifiedName as my ContentProviderTypeName and has overrided ResolveDirectory as well as ResolveRootDirectoryAsTree.

Please help.
Vessy
Telerik team
 answered on 18 Aug 2014
3 answers
571 views
How can we achieve the attached table structure with radgrid control. Basically it needs to contain the grouping by a specific configuration property like (Configuration System Hardware and NE Software, Service and Support etc. which actually consists of various product types grouped together.) on  top of the rows, then followed by Product Type which has to span multiple rows instead of showing on the top of the rows. The same product type has to be displayed again on the next if there are more records of the same product type. similar grouping is applicable for Product Fam column as well. Kindly suggest a best way for achieving the same.
Konstantin Dikov
Telerik team
 answered on 18 Aug 2014
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?