4 Answers, 1 is accepted
0

Jayesh Goyani
Top achievements
Rank 2
answered on 10 Jan 2013, 05:23 AM
Hello,
Thanks,
Jayesh Goyani
<
MasterTableView
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"ID"
UniqueName
=
"ID"
HeaderText
=
"ID"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"Name"
UniqueName
=
"Name"
HeaderText
=
"Name"
>
</
telerik:GridBoundColumn
>
<
telerik:GridEditCommandColumn
>
</
telerik:GridEditCommandColumn
>
<
telerik:GridTemplateColumn
>
<
ItemTemplate
>
<
asp:TextBox
ID
=
"txtTranslationText"
runat
=
"server"
Height
=
"44px"
></
asp:TextBox
>
</
ItemTemplate
>
</
telerik:GridTemplateColumn
>
</
Columns
>
</
MasterTableView
>
protected
void
RadGrid1_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridEditableItem && e.Item.IsInEditMode)
{
if
(e.Item
is
GridDataInsertItem)
{
GridEditableItem item = e.Item
as
GridEditableItem;
(item[
"ID"
].Controls[0]
as
TextBox).Focus();
(item.FindControl(
"txtTranslationText"
)
as
TextBox).Focus();
}
}
}
Thanks,
Jayesh Goyani
0

Shinu
Top achievements
Rank 2
answered on 10 Jan 2013, 05:30 AM
Hi,
You can make the inserted row selected with reference to this code library. Also you can set focus in the controls as shown below.
C#:
Thanks,
Shinu
You can make the inserted row selected with reference to this code library. Also you can set focus in the controls as shown below.
C#:
protected
void
RadGrid2_ItemDataBound(
object
sender, GridItemEventArgs e)
{
if
(e.Item
is
GridEditFormInsertItem && e.Item.OwnerTableView.IsItemInserted)
{
GridEditFormInsertItem item=(GridEditFormInsertItem)e.Item;
TextBox txt = (TextBox)item[
"UniqueName"
].Controls[0];
txt.Focus();
}
}
Thanks,
Shinu
0

Nirmala
Top achievements
Rank 1
answered on 10 Jan 2013, 02:07 PM
Hi,
I tried both of your suggestions none of them worked. My grid has Template columns not bound columns.
Thanks,
Nimmy
I tried both of your suggestions none of them worked. My grid has Template columns not bound columns.
Thanks,
Nimmy
0

Jayesh Goyani
Top achievements
Rank 2
answered on 11 Jan 2013, 05:20 AM
Hello,
I have update my previous post.
Thanks,
Jayesh Goyani
I have update my previous post.
Thanks,
Jayesh Goyani