Hi,
I have a telerik grid with template columns. One of the column has textbox as edit item template. And write onkeypress event for this textbox using javascript. On this event How i will identify the text inside the textbox is selected or not.
var selectedLength = textBox.selectionEnd - textBox.selectionStart;
var totalLength = textBox.value.length;
if (selectedLength == totalLength && totalLength > 0) {
alert("entire text is selected");
}
}
That should do the trick. Please give it a try and let me know about the result.
All the best,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.