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

[Solved] Issue with setting focus on textbox on nth Row

1 Answer 93 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Sreekumar Menon
Top achievements
Rank 1
Sreekumar Menon asked on 03 Aug 2011, 06:53 AM
Hi,

I am facing the following issue:

I have a grid inside a child window. The first column of the grid is a datatemplate which contains one text box and 2 text blocks.

When the child window is launched, I need to set focus inside the textbox on the nth row based on some logic.

I am writing the logic to get the index of the row and setting the textbox focus in the grid's loaded event.

However the focus always reverts back to the textbox in the first row and not the row I intended.

While debugging I found that the focus is being set on the textbox in the nth row, but immediately it is returned to the textbox in the first row.

Is there a way to achieve what I am trying to do. I looked out in the forums and tried setting the IsCurrentItemSelected as false but it doesnt help.

Kindly advise.

regards,
Sree

1 Answer, 1 is accepted

Sort by
0
Maya
Telerik team
answered on 03 Aug 2011, 07:58 AM
Hi Sreekumar Menon,

You may try the approach illustrated in this article.
 

Kind regards,
Maya
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Tags
GridView
Asked by
Sreekumar Menon
Top achievements
Rank 1
Answers by
Maya
Telerik team
Share this question
or