Hi Telerik team,
When i am double clicking in the Radgrid displaying/focusing textbox with data. If i have special characters inside the textbox then focus propety is giving error. Kindly help me ASAP.
Please find my code below:
<ClientEvents OnRowCreated="rgManualTestSteps_RowCreated" OnCommand="rgManualTestSteps_RadGrid1_Command"
OnRowClick="rgManualTestSteps_RowClick" OnRowMouseOut="rgManualTestSteps_RowClick"
OnRowDestroying="rgManualTestSteps_RowDestroying" />
function rgManualTestSteps_RowCreated(sender, eventArgs)
{
var dataItem = eventArgs.get_gridDataItem();
for (var i = 1; i < dataItem.get_element().cells.length; i++)
{
var cell = dataItem.get_element().cells[i];
if (cell)
{
$addHandler(cell, "dblclick", Function.createDelegate(cell, rgManualTestSteps_ShowColumnEditor));
}
}
}
function rgManualTestSteps_ShowColumnEditor()
{
rgManualTestSteps_editedCell = this;
//hide text and show column editor in the edited cell
var cellText = this.getElementsByTagName("span")[0];
if (cellText != undefined)
{
cellText.style.display = "none";
//display the span which wrapps the hidden checkbox editor
if (this.getElementsByTagName("span")[1]) {
this.getElementsByTagName("span")[1].style.display = "";
}
var colEditor = this.getElementsByTagName("input")[0] || this.getElementsByTagName("select")[0];
//if the column editor is a form decorated select dropdown, show it instead of the original
if (colEditor.className == "rfdRealInput" && colEditor.tagName.toLowerCase() == "select") colEditor = Telerik.Web.UI.RadFormDecorator.getDecoratedElement (colEditor);
colEditor.style.display = "";
colEditor.focus();
}
}
When i am double clicking in the Radgrid displaying/focusing textbox with data. If i have special characters inside the textbox then focus propety is giving error. Kindly help me ASAP.
Please find my code below:
<ClientEvents OnRowCreated="rgManualTestSteps_RowCreated" OnCommand="rgManualTestSteps_RadGrid1_Command"
OnRowClick="rgManualTestSteps_RowClick" OnRowMouseOut="rgManualTestSteps_RowClick"
OnRowDestroying="rgManualTestSteps_RowDestroying" />
function rgManualTestSteps_RowCreated(sender, eventArgs)
{
var dataItem = eventArgs.get_gridDataItem();
for (var i = 1; i < dataItem.get_element().cells.length; i++)
{
var cell = dataItem.get_element().cells[i];
if (cell)
{
$addHandler(cell, "dblclick", Function.createDelegate(cell, rgManualTestSteps_ShowColumnEditor));
}
}
}
function rgManualTestSteps_ShowColumnEditor()
{
rgManualTestSteps_editedCell = this;
//hide text and show column editor in the edited cell
var cellText = this.getElementsByTagName("span")[0];
if (cellText != undefined)
{
cellText.style.display = "none";
//display the span which wrapps the hidden checkbox editor
if (this.getElementsByTagName("span")[1]) {
this.getElementsByTagName("span")[1].style.display = "";
}
var colEditor = this.getElementsByTagName("input")[0] || this.getElementsByTagName("select")[0];
//if the column editor is a form decorated select dropdown, show it instead of the original
if (colEditor.className == "rfdRealInput" && colEditor.tagName.toLowerCase() == "select") colEditor = Telerik.Web.UI.RadFormDecorator.getDecoratedElement (colEditor);
colEditor.style.display = "";
colEditor.focus();
}
}