This is a migrated thread and some comments may be shown as answers.

[Solved] Javascript errors with AllowKeyboardNavigation

1 Answer 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Loy Chan
Top achievements
Rank 1
Loy Chan asked on 21 May 2008, 10:08 PM
With the new release (2008.1.515.20), a javascript exception is thrown when I enter a single quote or perecent sign in a "inplace" textfield. From further investigation, I found that this exception is only thrown if AllowKeyboardNavigation is set to true.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> 
 
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
    <title>Untitled Page</title> 
</head> 
<body> 
    <form id="form1" runat="server">  
        <asp:ScriptManager ID="ScriptManager1" runat="server" /> 
        <div> 
            <telerik:RadGrid ID="RadGrid1" runat="server"   
                OnNeedDataSource="RadGrid1_NeedDataSource">  
                <ClientSettings AllowKeyboardNavigation="true">  
                </ClientSettings>          
                <MasterTableView AutoGenerateColumns="False" DataKeyNames="Id" ClientDataKeyNames="Id" ShowHeader="true" EditMode="InPlace" CommandItemDisplay="top" > 
                    <Columns> 
                        <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" ButtonType="ImageButton" />                  
                        <telerik:GridBoundColumn UniqueName="someColumn" DataField="someField" /> 
                    </Columns> 
                </MasterTableView> 
            </telerik:RadGrid></div>  
    </form> 
</body> 
</html> 
 


using System;  
using System.Data;  
using System.Configuration;  
using System.Web;  
using System.Web.Security;  
using System.Web.UI;  
using System.Web.UI.WebControls;  
using System.Web.UI.WebControls.WebParts;  
using System.Web.UI.HtmlControls;  
 
public partial class _Default : System.Web.UI.Page   
{  
    protected void Page_Load(object sender, EventArgs e)  
    {  
 
    }  
    protected void RadGrid1_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)  
    {  
        RadGrid1.DataSource = new DataTable();  
    }  


So if you try out the preceeding code, press the insert new record button and try to type a single quote or percent sign in the text field.

1 Answer, 1 is accepted

Sort by
0
Pavel
Telerik team
answered on 27 May 2008, 06:42 AM
Hello Loy Chan,

Indeed you are right and the error can be observed in this scenario. Thank you for bringing this problem to our attention. Hopefully our developers will fix it for the next official release. Please excuse us for the temporary inconvenience. As a token of gratitude I have updated your Telerik points.

Greetings,
Pavel
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Loy Chan
Top achievements
Rank 1
Answers by
Pavel
Telerik team
Share this question
or