5 Answers, 1 is accepted
0

Jayesh Goyani
Top achievements
Rank 2
answered on 17 Sep 2012, 06:22 AM
Hello,
Sorry, My below code snippet not fulfill your requirement.
Thanks,
Jayesh Goyani
Sorry, My below code snippet not fulfill your requirement.
<
telerik:GridTemplateColumn
>
<
EditItemTemplate
>
<
asp:TextBox
ID
=
"TextBox1"
runat
=
"server"
></
asp:TextBox
>
</
EditItemTemplate
>
</
telerik:GridTemplateColumn
>
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item.IsInEditMode && e.Item
is
GridEditableItem)
{
GridEditableItem item = e.Item
as
GridEditableItem;
TextBox TextBox1 = item.FindControl(
"TextBox1"
)
as
TextBox;
TextBox1.Focus();
}
}
Thanks,
Jayesh Goyani
0

Shinu
Top achievements
Rank 2
answered on 17 Sep 2012, 07:46 AM
Hi Anzar,
Please check the sample script I tried to validate a TextBox inside the Template Column in onblur event.
ASPX:
Javascript:
Thanks,
Shinu.
Please check the sample script I tried to validate a TextBox inside the Template Column in onblur event.
ASPX:
<
telerik:GridTemplateColumn
>
<
ItemTemplate
>
<
asp:TextBox
ID
=
"TextBox1"
runat
=
"server"
OnBlur
=
"Onblur(this)"
></
asp:TextBox
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
Javascript:
function
Onblur(TextBox)
{
if
(TextBox.value ==
"2"
)
//checking for the value '2', if true set focus
{
window.setTimeout(
function
() { TextBox.focus(); }, 20);
}
}
Thanks,
Shinu.
0

Anzar
Top achievements
Rank 2
answered on 17 Sep 2012, 12:18 PM
Hi Shinu,
I tried your code. Its working properly.
Thanks & Regards
Anzar.M
I tried your code. Its working properly.
Thanks & Regards
Anzar.M
0

Anzar
Top achievements
Rank 2
answered on 17 Sep 2012, 12:26 PM
HI,
How to identify the the text of the texxtbox is selected or not?
Thanks & Regards
Anzar.M
How to identify the the text of the texxtbox is selected or not?
Thanks & Regards
Anzar.M
0

Gowtham
Top achievements
Rank 1
answered on 06 May 2014, 03:01 PM
Thanks to Jayesh Goyani's
working good.....
working good.....