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

Radgrid : Textbox focus is not working while having special charaters inside the TextBox.

1 Answer 95 Views
Grid
This is a migrated thread and some comments may be shown as answers.
nazeer
Top achievements
Rank 1
nazeer asked on 19 May 2014, 11:11 AM
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();
      }
}

1 Answer, 1 is accepted

Sort by
0
nazeer
Top achievements
Rank 1
answered on 28 May 2014, 07:04 AM
Team,

Any updates on this?
Tags
Grid
Asked by
nazeer
Top achievements
Rank 1
Answers by
nazeer
Top achievements
Rank 1
Share this question
or