Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
678 views

I have a Kendo Grid.When I press the enter key the enter Key should behave like the tab key function on kendo grid(Focus And put the next cell to editable mode if it is editable true).Is there any method to Override the Kendo Grid Navigation key?
If there is another proper way what is that?

 

Ankita
Top achievements
Rank 1
 answered on 21 Feb 2019
5 answers
73 views

Hi Folks,

I had previously set up my RadRotator using a DataSource with a bound ImageURL to server path to image files.  This was working fine up until last night when our Windows update went live.  I presume it's done something with IE11 (our default browser) as the images for the rotator are now not showing.

The rotator itself loads; the buttons are visible.  Just no images.

When loading the webpage under Chrome, Firefox or Edge, it still works correctly.

Does anyone know specifically what has happened to stop the images loading, and what I'll need to do to fix this?  I'm guessing it might have something to do with security around either the database or loading images directly from a server path.

<%@ Control Language="C#" AutoEventWireup="false" CodeBehind="TransformationRotator.ascx.cs" Inherits="PNCCPortal.UI.NewsModules.TransformationRotator" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<script type="text/javascript">
    function OnClientLoad(rotator, args)
    {
        if (!rotator.autoIntervalID)
        {
            rotator.autoIntervalID = window.setInterval(function ()
            {
                rotator.showNext(Telerik.Web.UI.RotatorScrollDirection.Left);
            }, rotator.get_frameDuration());
        }
    }
</script>
<telerik:RadRotator RenderMode="Lightweight" Width="1963px" Height="450px" ItemWidth="1903px" ItemHeight="450px" ID="rotTransformation"
                    runat="server" RotatorType="Buttons" DataSourceID="dsTransformation" Style="margin: -5px 0 0 -388px" FrameDuration="20000"
                    OnClientLoad="OnClientLoad">
    <ItemTemplate>
        <a href='<%# DataBinder.Eval(Container.DataItem, "URLLink") %>'>
            <asp:Image runat="server" ID="MarqueeImage" ImageUrl='<%# DataBinder.Eval(Container.DataItem, "ImagePath") %>' />
        </a>
    </ItemTemplate>
</telerik:RadRotator>
<asp:SqlDataSource ID="dsTransformation" runat="server" ConnectionString="server=XXXX;UID=XXXX;PWD=XXXX;database=XXXX" SelectCommand="select
    *
from
    PNCC_MOJO_TransformationMarqeeImage
where
    Active = 1"></asp:SqlDataSource>
Kenyon
Top achievements
Rank 1
 answered on 20 Feb 2019
3 answers
182 views

Attempting to use an XmlDataSource to populate the values in a dropdown list control in a GridTemplateColumn edit and insert templates.

Searched over:
 1 - using ASP datasources: https://docs.telerik.com/devtools/aspnet-ajax/controls/combobox/data-binding/binding-to-asp-datasource-components
 2 - using inline XML in an XmlDataSource: http://www.java2s.com/Code/ASP/XML/UsingInlineXMLDatainanXmlDataSourceControl.htm
 3 - fixing the 'GridInsertionObject does not contain a property named 'X' ' error: https://weblogs.asp.net/kencox/fixing-the-telerik-webcontrols-gridinsertionobject-does-not-contain-a-property-error
 4- Populating a dropdownlist in a datagrid template column: https://docs.telerik.com/devtools/aspnet-ajax/controls/grid/how-to/Common/radcombobox-in-radgrid
 
 * Yes, the links above reference the combobox control, presumably the dropdown list functions the same way.
 
 Goal: Populate a DropDown list using an XmlDataSource and inline XML
 
 Problem: it does not work.
 Looking for the proper format of the inline XML to get this to work.
  Links 1 and 4 say that the XML file has to be formatted as <items><item>, but this causes an error when inline stating that 'items' is invalid'
  Links 2 say to use <Data><items><item>, which doesn't throw an error but doesn't load
  Using the method from Link 3 to set the default values, I avoid the GridInsertObject error, but the defaulted value is not bound.

<telerik:GridTemplateColumn HeaderText="Wpn Qual" DefaultInsertValue="M">
    <ItemTemplate><%#DataBinder.Eval(Container.DataItem,"WPN_QUAL_BADGE") %></ItemTemplate>
    <EditItemTemplate>
        <telerik:RadDropDownList runat="server" ID="ddlWpnQual" DataTextField="Text" DataValueField="Value" DataSourceID="xmlWpnQual"
            SelectedValue='<%#Bind("WPN_QUAL_BADGE") %>' ></telerik:RadDropDownList>
    </EditItemTemplate>
    <InsertItemTemplate>
        <telerik:RadDropDownList runat="server" ID="ddlWpnQual" DataTextField="Text" DataValueField="Value" DataSourceID="xmlWpnQual"
            SelectedValue='<%#Bind("WPN_QUAL_BADGE") %>' ></telerik:RadDropDownList>
    </InsertItemTemplate>
</telerik:GridTemplateColumn>

 

<asp:XmlDataSource ID="xmlWpnQual" runat="server" XPath="Data/Items" >
    <Data>
        <Items>
            <Item Text="-- Select --" Value="" />
            <Item Text="Marksman" Value="M" />
            <Item Text="SharpShooter" Value="S" />
            <Item Text="Expert" Value="E" />
        </Items>
    </Data>
</asp:XmlDataSource>

 

And yes, I can manually create the items via markup in each instance of the dropdownlist... I would prefer to use a scalable approach in this specific instance.

 

 

Eric R | Senior Technical Support Engineer
Telerik team
 answered on 20 Feb 2019
4 answers
156 views
How do i set the scroll bar colurs of Radgrid ...

Regards
wallafe
Top achievements
Rank 1
 answered on 20 Feb 2019
4 answers
805 views

Hi

For my dropdownlist, everything works fine except the arrow is not showing up. png files are there in ...Styles/Default folder. Is there another file that would be missing in my project, something like ...kendo.all.min.js or whatever...

Marin Bratanov
Telerik team
 answered on 20 Feb 2019
5 answers
134 views

Windows 7 Enterprise - IE 11 (Version 11.0.9600.19236)
VS 2012 - .NET Framework 3.5
Telerik UI For ASP.NET AJAX 2016.2.607.305

We've been using the RadRadialGauge control in our intranet web application for years since around 2016 with no issues.  Just recently (not sure exactly when) our users started noticing that the control was no longer displaying, just completely blank (see attachment 3-RadRadialGauge_Missing.jpg).  After some analyzing & testing I've determined it doesn't seem to be a licensing or server-side issue. 

To come to this conclusion I decided to try the RadLabel control which is just textual & has no graphic rendering like RadRadialGauge (see attachment 1-RadLabel.jpg).  It appears fine since it's only displaying text.

Next I tried RadDatePicker which has a combination of text & graphic rendering (see attachment 2-RadDatePicker.jpg).  It resulted in sort of a hybrid display where the date input box is there, but instead of showing the calendar icon it just has the mouse hover text.

It should be noted throughout this process I also tried downloading the latest version of these controls (2019.1.115.35) but still experienced the same behavior.  I'm theorizing these problems are due to a Windows or more likely IE update which we might have recently received.  All software updates like this are managed at the Enterprise level & pushed to all users in our company.  I've tried searching the forums & I see here & there somewhat similar rendering issues posted, but nothing so far which has resolved my particular issue.

Any help would be greatly appreciated!

Ryan
Top achievements
Rank 1
 answered on 20 Feb 2019
1 answer
165 views

Hi,

I have a split button and RadContextMenu, however for the life of me cannot get the MPE to fire from the Context items and its driving me up the wall. Can anyone please help point me in the right direction.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ShowModal.aspx.cs"
    Inherits="Default" %>
 
<%@ Register Namespace="AjaxControlToolkit" TagPrefix="AjaxControlToolkit" Assembly="AjaxControlToolkit" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        </telerik:RadScriptManager>
 
        <telerik:RadButton EnableSplitButton="true" ID="btnPOSplitBtn" runat="server" Text="Search"
            OnClientClicked="OnClientClicked">
        </telerik:RadButton>
        <telerik:RadContextMenu ID="POActionsMenu" runat="server" OnItemClick="POActionsMenu_ItemClick">
            <Items>
 
                <telerik:RadMenuItem Text="Export CSV" Value="3">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Text="Change Status to Printed" Value="4">
                </telerik:RadMenuItem>
                <telerik:RadMenuItem Text="Delete Purchase Order" Value="5">
                </telerik:RadMenuItem>
            </Items>
        </telerik:RadContextMenu>
 
        <%-- Alert Box --%>
        <asp:LinkButton ID="lnkConfirm" runat="server"></asp:LinkButton>
        <AjaxControlToolkit:ModalPopupExtender ID="mpeConfirm" runat="server" DropShadow="false" PopupControlID="pnlConfirm" TargetControlID="lnkConfirm" BackgroundCssClass="modalBackground" BehaviorID="Confirmations" CancelControlID="btnCloseConfirm">
        </AjaxControlToolkit:ModalPopupExtender>
        <asp:Panel ID="pnlConfirm" runat="server" CssClass="modalPopup" Style="display: none; width: 80%; max-height: 80%; overflow-y: auto;">
 
            <h2>Are you sure?</h2>
            <p>
 
                <asp:Label ID="lblConfirmAlert" runat="server"></asp:Label>
            </p>
 
            <telerik:RadButton ID="btnConfirmClose" runat="server" Text="No - Close" UseSubmitBehavior="false" />
        </asp:Panel>
 
        <telerik:RadScriptBlock runat="server">
            <script type="text/javascript">
 
                function OnClientClicked(sender, args) {
                    if (args.IsSplitButtonClick()) {
                        var currentLocation = $telerik.getLocation(sender.get_element());
                        var contextMenu = $find("<%=POActionsMenu.ClientID%>");
                        contextMenu.showAt(currentLocation.x + 75, currentLocation.y + 32);
 
                        sender.set_autoPostBack(false);
                    }
                    else {
                        sender.set_autoPostBack(true);
 
                    }
                }
            </script>
        </telerik:RadScriptBlock>
    </form>
</body>
</html>

 

and my code behind.

using System;
using Telerik.Web.UI;
 
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
 
    protected void POActionsMenu_ItemClick(object sender, RadMenuEventArgs e)
    {
        RadContextMenu btn = (RadContextMenu)(sender);
 
        string value = btn.SelectedValue;
 
        switch (value)
        {
            //View PO
            case "1":
 
                break;
 
            //Send me a copy
            case "2":
 
                break;
            //Export CSV
            case "3":
 
                break;
 
            //Change status to printed
            case "4":
 
                //   btnConfirmYes.CommandArgument = "Change to Printed";
                mpeConfirm.Show();
 
                //changeStatusToP();
 
                break;
 
            //Delete po
            case "5":
 
                //    btnConfirmYes.CommandArgument = "Delete PO";
                mpeConfirm.Show();
 
                // deletePO();
                break;
        }
    }
}

 

Thanks in advance, its driving me crazy as it hits the mpeConfirm.show() event but never shows. (CSS not included)

Paul
Top achievements
Rank 1
 answered on 20 Feb 2019
8 answers
1.1K+ views
I have a scenario which is similar to the Related Combobox demo (the value of one combo box triggers the population of the second combobox).  However, my requirements dictate that the second combobox not be visible until the user selects an item in the first combo box.  When I set the Visibility=false of the second combo box I get an error on the client side because the $find() method returns null when trying to find the second combobox.  After reviewing the source it appears that the second combobox isn't rendered.

Is there a way to hide the second combobox without setting Visible=false on the server so that the object can be retrieved on the client?
Marin Bratanov
Telerik team
 answered on 20 Feb 2019
1 answer
240 views
<telerik:RadGrid ID="RadGrid1" runat="server" BorderColor="#0086B9" CssClass="radgrid1css" DataSourceID="SqlDataOrderInfo" Skin="Bootstrap" AutoGenerateColumns="False">
                 <GroupingSettings CollapseAllTooltip="Collapse all groups" />
                 <MasterTableView DataSourceID="SqlDataOrderInfo" DataKeyNames="SN,OrderNo">
                      
                     <DetailTables>
                         <telerik:GridTableView runat="server" DataKeyNames="SN" DataSourceID="SqlDataOrderItems"
                              AllowAutomaticDeletes="True" AllowAutomaticInserts="True" AllowAutomaticUpdates="True">
                             <ParentTableRelation>
                                 <telerik:GridRelationFields DetailKeyField="OrderNo" MasterKeyField="OrderNo" />
                             </ParentTableRelation>
                             <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="False" />
                             <Columns>
                                 <telerik:GridBoundColumn DataField="ItemName" FilterControlAltText="Filter ItemName column" HeaderText="Item Name" UniqueName="ItemName">
                                 </telerik:GridBoundColumn>
                                 <telerik:GridBoundColumn DataField="ItemDescription" FilterControlAltText="Filter ItemDescription column" HeaderText="Item Description" UniqueName="ItemDescription">
                                 </telerik:GridBoundColumn>
                                 <telerik:GridCheckBoxColumn DataField="Status" DataType="System.Boolean"
                                    FilterControlAltText="Filter Status column" HeaderText="Status" UniqueName="Status">
                                     <HeaderStyle HorizontalAlign="Center" />
                                     <ItemStyle HorizontalAlign="Center" />
                                 </telerik:GridCheckBoxColumn>
                                 <telerik:GridTemplateColumn DataField="Comment" FilterControlAltText="Filter Comment column"
                                    HeaderText="Comment" UniqueName="Comment">
                                     <ItemTemplate>
                                         <telerik:RadTextBox ID="RadTextBox1" Runat="server" Skin="Bootstrap" TextMode="MultiLine"
                                              Width="100%" LabelWidth="40%" Resize="None" Text='<%# eval("Comment") %>'>
                                         </telerik:RadTextBox>
                                     </ItemTemplate>
                                 </telerik:GridTemplateColumn>
                             </Columns>
                         </telerik:GridTableView>
                     </DetailTables>
                      
                     <CommandItemSettings ShowAddNewRecordButton="False" ShowRefreshButton="False" />
                     <Columns>
                         <telerik:GridBoundColumn DataField="OrderId" DataType="System.Int32" FilterControlAltText="Filter
                          OrderId column" HeaderText="OrderId" SortExpression="OrderId" UniqueName="OrderId">
                         </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="OrderNo" DataType="System.Int32" FilterControlAltText="Filter
                            OrderNo column" HeaderText="OrderNo" SortExpression="OrderNo" UniqueName="OrderNo">
                         </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="Price" FilterControlAltText="Filter Price column" HeaderText="Price" SortExpression="Price" UniqueName="Price">
                         </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="Item" FilterControlAltText="Filter Item column" HeaderText="Item" SortExpression="Item" UniqueName="Item">
                         </telerik:GridBoundColumn>
                         <telerik:GridBoundColumn DataField="SupplierName" FilterControlAltText="Filter SupplierName column" HeaderText="SupplierName" SortExpression="SupplierName" UniqueName="SupplierName">
                         </telerik:GridBoundColumn>
                     </Columns>
                     <HeaderStyle BackColor="#E8F0F9" BorderColor="#0086B9" ForeColor="#0086B9" />
                     <CommandItemStyle BackColor="#0086B9" ForeColor="White" Height="35px" HorizontalAlign="Center" />
                 </MasterTableView>
             </telerik:RadGrid>

 

Code Behind

Protected Sub RadButton1_Click(sender As Object, e As EventArgs) Handles RadButton1.Click
 
 
        For Each item As GridDataItem In RadGrid1.MasterTableView.Items
 
            Dim lbtn As RadTextBox = DirectCast(item("Comment").FindControl("RadTextBox1"), RadTextBox)
 
            Dim custoID As Single = item.GetDataKeyValue("SN")
 
            
            DrugSQL("update orderitem set comment='" & lbtn.Text & "'  where sn='" & custoID & "'  ")
        Next
 
    End Sub

 

Eyup
Telerik team
 answered on 20 Feb 2019
0 answers
182 views

I am trying to use the toggleExpandCollapse client function and it seems to not work at all.   I also am seeing console errors while trying settings to enable the toggleExpandCollapse function.

 

If I have a TreeList and set ExpandCollapseMode="combined" or "client" I get this error in the console as soon as I try to expand an item.   The expanding does work, but collapsing does not, it gives the below error.   On top of this if I set the ExpandCollapseMode to "client" the TreeList opens up with ALL items expanded out, but while in Server  or Combined mode it does not.   What am I doing wrong?

Uncaught TypeError: Cannot read property 'toggleExpandCollapse' of null
    at HTMLButtonElement.onclick

Uncaught TypeError: Cannot read property 'Combined' of undefined
    at Telerik.Web.UI.TreeListDataItem.initialize (Telerik.Web.UI.WebResource.axd

 

Here is the JS function I cam calling.

 

function collapseTree(radTreeListItemID) {
                            debugger;
 
                            var oTree = $find('<%= RadTreeList1.ClientID %>');
                            var keys = oTree.get_clientDataKeyNames();
                             
                            oTree.get_dataItems().forEach(function (a) {
                                var expanded = a.get_expanded();
                                var title = a.get_element().innerText;
                                var id = a.get_dataKeyValue('ID');
 
                                //  loop through all the items and locate the one with the matching input datakey.
                                // set expanded to false..   doesnt seem to work..  setting visibility does.
                                if (id == radTreeListItemID && expanded) {
                                    debugger;
                                    // Make invisible - works
                                    //a.set_visible(false);
 
                                    //  this should just work but doesnt
                                    a.toggleExpandCollapse();
                                    a.set_clientExpanded(false);
 
                                    // doesnt work..  however a work around may be to loop through the child items and make invisible.
                                    // onpostback, they are re-written to page anyway..   problem is user control seems to not go away, so youd have to
                                    // locate that control in the element and hide too.
                                     
                                    a.get_childItems().forEach(function (innerItem) {
                                        innerItem.set_visible(false);
                                    });
 
                                }
 
                            });
 
                        };

 

 

Pat Huesers
Top achievements
Rank 1
 asked on 19 Feb 2019
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
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
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?