Telerik Forums
UI for ASP.NET AJAX Forum
6 answers
552 views
Hi,
I've submitted a support ticket for this (twice), but never heard back from Telerik.  So I thought I'd turn to the forums.

I'm using an older version of Telerik (2010.2.826.40).  Our company is in the process of updating to a newer version but will not be ready by the time I need to release.

I'm using RadGrid and following several articles I've found online, I have successfully managed to put a page into Edit Mode (I'm using InPlace).  I am able to validate input and display error messages.Basically everything is working, or was until I tried to conquer capturing the OnKeyPress event from an editable field.  Specifically I want to catch the Tab Key Event (Tabbing from edit field to edit field is working fine).I want to catch the tab key in the last field of the last row so I can programmatically go to the next page.

When in edit mode, the last field is a dropdownlist.  I've set up the OnKeyPress event to be caught on the client side, but the client side is never catching the event.  Is it because I'm in edit mode?
 I set this on the server side when initializing the grid:  RadGridControl.ClientSettings.ClientEvents.OnKeyPress = "Grid_OnKeyPress";
 
I have the following function on the client side:
         function Grid_OnKeyPress(sender, args)
         {
             alert("Key Code: " + args.get_keyCode());
             debugger;
             // looking for tab key 
             if (args.keyCode == 9) 
             {
                 debugger;
             }
             return;
         } 

In the past I've successfully caught the onkeypress event from GridFilteringItem, but I was not in edit mode.  Would anyone able to provide me with an example of catching the onkeypress event in edit mode?  I've tried setting the attribute (Attributes.Add) various ways and am still not capturing the keypress event.
         1) Row level:  In ItemDataBound set GridDataItem Attributes.Add
         2) Item Grid Cell:  In ItemCreated & ItemDataBound GridDataItem[unique name].Attributes.Add
         3) The editable dropdownlist:  GridEditableItem.FindControl(dropdownlist) 
         4) The entire grid: .ClientSettings.ClientEvents.OnKeyPress = "Grid_OnKeyPress"

When using Attributes.Add on the server side I used code like this:

  gdi.Attributes.Add("onkeypress",
                           "fireCatchTabKeyCommand('" + discountSearchResultsGrid.RadGridControl.ClientID.ToString(CultureInfo.CurrentCulture) + "', '" + discountSearchResultsGrid.RadGridControl.CurrentPageIndex + "', '" + discountSearchResultsGrid.RadGridControl.MasterTableView.PagingManager.IsLastPage + "', this, event)");


Thanks.
Kim
Top achievements
Rank 1
 answered on 24 Mar 2014
2 answers
48 views
Implemented the Radmenu and have the styling as I wanted it and now want to implement the HighlightPath feature.  It works but it leaves the selected menu item white.  What do I need to add to my css to change the selected menu option?  I would like to change the font color green.

/*Main menu top level */
DIV.RadMenu_ASI .rmRootGroup
{
    Background: linear-gradient(to bottom, #290448 0%,#140224 44%,#040008 100%) !important ;
    background: #1e0335; /* Old browsers */
    background: -moz-linear-gradient(top, #290448 0%, #140224 44%, #040008 100%); /* FF3.6+ */
    background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#290448), color-stop(44%,#140224), color-stop(100%,#040008)); /* Chrome,Safari4+ */
    background: -webkit-linear-gradient(top, #290448 0%,#140224 44%,#040008 100%); /* Chrome10+,Safari5.1+ */
    background: -o-linear-gradient(top, #290448 0%,#140224 44%,#040008 100%); /* Opera 11.10+ */
    background: -ms-linear-gradient(top, #290448 0%,#140224 44%,#040008 100%); /* IE10+ */
    background: linear-gradient(to bottom, #290448 0%,#140224 44%,#040008 100%); /* W3C */
    filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#290448', endColorstr='#040008',GradientType=0 ); /* IE6-9 */
}
 
DIV.RadMenu_ASI .rmRootGroup .rmLink
{
    FONT-SIZE: 12px;
    font-family: Crete Round !important;
    COLOR: #FFFFFF !important;
    LINE-HEIGHT: 50px !important;
    BACKGROUND-IMAGE: none;
}
 
DIV.RadMenu_ASI .rmRootGroup .rmText
{
    BACKGROUND-IMAGE: none;
    padding-left: 30px !important;
    padding-right: 30px !important;
}
 
DIV.RadMenu_ASI .rmRootGroup .rmLink:hover
{
    BACKGROUND-IMAGE: none;
    background-color: #6d9c1f !important;
}
 
/* color of the head menu item as viewing submenu */
DIV.RadMenu_ASI .rmRootGroup .rmExpanded
{
    BACKGROUND-IMAGE: none;
    background-color: #6d9c1f !important;
}
 
/* Sub grouping Styles */
DIV.RadMenu_ASI .rmGroup
{
    line-height: 20px !important;
    padding: 0px !important;
}
 
DIV.RadMenu_ASI .rmGroup .rmLink
{
    FONT-SIZE: 12px;
    font-family: Crete Round !important;
    COLOR: #FFFFFF !important;
    BACKGROUND-IMAGE: none;
    background-color: #6d9c1f !important;
}
 
 
DIV.RadMenu_ASI .rmGroup .rmLink:hover
{
    BACKGROUND-IMAGE: none;
    background-color: #87AE47 !important;
    width: 90%;
    text-decoration: none;
}
 
DIV.RadMenu_ASI .rmSeparator .rmText
{
    padding-bottom: 0px !important;
    padding-top: 0px !important;
    margin-bottom: 0px !important;
    margin-top: 0px !important;
}
Kurt Kluth
Top achievements
Rank 1
 answered on 24 Mar 2014
1 answer
72 views
I can't run the sample code projects as I'm getting the following error when trying to connect to the demo mdf files. 

Database 'Northwind' cannot be upgraded because its non-release version (539) is not supported by this version of SQL Server. You cannot open a database that is incompatible with this version of sqlservr.exe. You must re-create the database.
Could not open new database 'Northwind'. CREATE DATABASE is aborted. (.Net SqlClient Data Provider)

We are using SQL 2012 express and server pro

Any ideas? I would assume telerik would have put out database examples more recent than 14 years!
Danail Vasilev
Telerik team
 answered on 24 Mar 2014
3 answers
387 views

I'm trying to implement a cascading type behvaior between RadComboBoxes so that a second ComboBox gets populated when a user checks items in the first ComboBox. I've wired up a handler on the OnTextChanged event because I wanted my logic to execute after a users has finished checking the desired items not after each item is checked. I'm setting the initial checked items in the first ComboBox during Page Load based on an existing record in the Database. What I'm noticing is that the OnTextChanged event is firing during the first Post Back to the page regardless of which control initiated the Post Back. I've mocked up a sample page to recreate the behavior.

aspx:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test2.aspx.cs" Inherits="Test2" %>
 
<!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 style="background-color: #c3cce5">
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadComboBox ID="RadDropDownList" runat="server"
        MaxHeight="300px" Width="200px" DropDownAutoWidth="Enabled" OnTextChanged="RadDropDownList_TextChanged"
        EmptyMessage="--Choose--" CheckBoxes="true" AutoPostBack="true" >
        <Items>
            <telerik:RadComboBoxItem Value="test1" Text="Test1" />
            <telerik:RadComboBoxItem Value="test2" Text="Test2" />
            <telerik:RadComboBoxItem Value="test3" Text="Test3" />
            <telerik:RadComboBoxItem Value="test4" Text="Test4" />
            <telerik:RadComboBoxItem Value="test5" Text="Test5" />
        </Items>
    </telerik:RadComboBox>
    <asp:Button ID="UpdateButton" runat="server"
        Text="Update" OnClick="UpdateButton_Click" />
    </form>
</body>
</html>

aspc.cs:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
 
public partial class Test2 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Page.IsPostBack)
        {
            System.Diagnostics.Debug.WriteLine("Page Load PostBack");
        }
        else
        {
            System.Diagnostics.Debug.WriteLine("Page Load No PostBack");
            //Select a value
            if (RadDropDownList.FindItemByText("Test3") != null)
            {
                RadDropDownList.FindItemByText("Test3").Checked = true;
            }
        }
    }
 
    protected void RadDropDownList_TextChanged(object sender, EventArgs e)
    {
        System.Diagnostics.Debug.WriteLine("RadDropDownList_TextChanged");
    }
 
    protected void UpdateButton_Click(object sender, EventArgs e)
    {
        System.Diagnostics.Debug.WriteLine("UpdateRuleButton_Click");
    }
}


When I run the page, I see the following output:
    Page Load No PostBack

When I click on the Update Button (i.e. I haven't changed anything in the ComboBox), I see the following output:
    Page Load PostBack
    RadDropDownList_TextChanged
    UpdateRuleButton_Click

Notice that the RadDropDownList_TextChanged method is getting called even though the postback was initated from the Update Button. Why/how is the RadDropDownList_TextChanged getting executed? Is it due to the fact of me setting the value during Initial Page Load?

If I click the Button again, I get the expected behavior:
    Page Load PostBack
    UpdateRuleButton_Click

If I comment out the checking of the Item during Page Load of the ComboBox, then I don't experience the weird Behavior. Wondering if this is a bug or working as designed.



Aneliya Petkova
Telerik team
 answered on 24 Mar 2014
1 answer
57 views
When is the service pack targeted for release for 2014 Q1 ??
Helen
Telerik team
 answered on 24 Mar 2014
2 answers
69 views
Hi all, I just updated one of our applications to the latest version of Telerik ASP.NET AJAX (v2014.1.225.35). After doing this, the RadEditor toolbar in the application is no longer wrapping. We set the toolbar using the ToolsFile.xml (see below). Is there something else I need to do to get the toolbar to wrap?

<root>
<tools>
<tool name="FindAndReplace"/>
<tool name="Print"/>
<tool separator="true"/>
<tool name="Cut"/>
<tool name="Copy"/>
<tool name="Paste"/>
<tool name="PasteFromWord"/>
<tool name="PastePlainText"/>
<tool separator="true"/>
<tool name="Undo"/>
<tool name="Redo"/>
<tool separator="true"/>
<tool name="InsertTable"/>
<tool separator="true"/>
<tool name="InsertLink"/>
<tool name="Unlink"/>
<tool name="InsertSymbol"/>
<tool separator="true"/>
<tool name="Bold"/>
<tool name="Italic"/>
<tool name="Underline"/>
<tool name="ForeColor"/>
<tool name="BackColor"/>
<tool name="FormatBlock"/>
<tool name="FontName" />
</tools>
<tools name="MainToolbar" enabled="true">
<tool name="RealFontSize" />
</tools>
<tools>
<tool separator="true"/>
<tool name="JustifyLeft"/>
<tool name="JustifyCenter"/>
<tool name="JustifyRight"/>
<tool name="JustifyFull"/>
<tool separator="true"/>
<tool name="InsertOrderedList"/>
<tool name="InsertUnorderedList"/>
<tool name="Outdent"/>
<tool name="Indent"/>
<tool separator="true"/>
<tool name="StrikeThrough"/>
<tool name="Subscript"/>
<tool name="Superscript"/>
<tool separator="true"/>
<tool name="AjaxSpellCheck"/>
</tools>
<fontNames>
<item name="Arial" />
<item name="Calibri" />
</fontNames>
<realFontSizes>
<item value="12pt"></item>
<item value="14pt"></item>
<item value="16pt"></item>
<item value="18pt"></item>
<item value="20pt"></item>
<item value="22pt"></item>
</realFontSizes>
</root>
Ianko
Telerik team
 answered on 24 Mar 2014
3 answers
197 views
Hi,

I could not close Visual Studio 2010 after the latest update. I updated on 11/12/2013
Everytime I tried to close VS2010, VS stopped me with below error msg (img attached)
"Could not load file or assembly 'Telerik.VSX.ErrorReporting.2013.2.925.0, Version=2013.2.925.0, .."

I am using: VS 2010 Version 10.0.40219.1 SP1 Rel

Could you please advise?
Petar
Telerik team
 answered on 24 Mar 2014
22 answers
808 views
I'm trying to use RadEditor to have the ability to display object/embed code, such as an "embed link" from youtube.  But having a few issues with it.  If I were to add the embed code in HTML view, and then go to Design View, the video will show up fine... however if I were to switch back to HTML view, all of the code disappears.

That is issue #1, Issue #2 seems to be have the same result, however happens when I go to save the content of the Editor to the DB.  The code disappears and the video embed is not displayed.

Does this happen for anyone else?  Is there a fix?

Thanks,
Travis
Ianko
Telerik team
 answered on 24 Mar 2014
1 answer
120 views
I am trying to do a print preview.  I see the feature in windows pivot grid.-  RadpivotGrod1.PrintPreview().  Is this feature there in Ajax pivot grid.


Thanks,
Kalyani
Maria Ilieva
Telerik team
 answered on 24 Mar 2014
2 answers
74 views
Hi,

Following an update to 2014 Q1 release (base build and the 318 build) I have found that the control below is not firing the OnClientItemChecked event, given that the event seems to work on the demo site I assume that this issue is caused by my use of a checkbox within the ItemTemplate.  This works just fine on earlier 2013 releases.  Anyone know of a work around on this?  

Regards

Jon

                                       
<telerik:RadListBox ID="uxOperativeListBox" runat="server" Height="330" Width="380" OnItemDataBound="uxOperativeListBox_ItemDataBound" OnClientItemChecked="OperativeListBoxClicked">
    <ItemTemplate>
        <div>
            <asp:CheckBox runat="server" ID="uxCheckbox" Checked='false' style="vertical-align:middle;" />
            <asp:Image runat="server" ID="uxOperativeStatus" ImageUrl="~/Images/Icons/16/ok.png" style="vertical-align:middle;" />
            <asp:Label runat="server" ID="uxOperative" AssociatedControlID="uxCheckbox" style="vertical-align:middle;"></asp:Label>
        </div>
    </ItemTemplate>
</telerik:RadListBox>
Jon
Top achievements
Rank 1
 answered on 24 Mar 2014
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?