将焦点设置为AJAX tabcontainer的tabpanel内的文本框 [英] Set Focus to a textbox within tabpanel of a AJAX tabcontainer
问题描述
让我详细说明一下该方案.我有一个带有4个标签面板的标签容器"tabcontainer1
".假设在第三个面板中,我有一个textbox
会在验证时生成错误''.问题是验证后tabindex变为0,而我无法将焦点设置在文本框中.
在这里我只知道textbox
控件ID,无论如何我都可以将activetabindex
设置到第三个面板并将焦点设置到textbox
.我正在尝试编写一种通用方法,我可以将textbox
ID传递给该通用方法,以便在父tabcontainer中找到选项卡面板的索引,以便可以将activetabindex
设置为textbox
.
请让我知道是否可以找到textbox
的实际面板并为其设置索引,并将焦点设置为textbox
.
谢谢,
Anandhi
Let me elaborate the scenario a bit more. I have a tabcontainer ''tabcontainer1
'' with 4 tabpanels in it. Let''s say in the 3rd panel I have a textbox
which generates the error'' on validation. The problem is tabindex turns to 0 after validation and I''m not able to set the focus on the textbox.
Here I know the textbox
control ID alone.Is there anyway I can set the activetabindex
to the third panel and set the focus to the textbox
. I''m trying to write a generic method to which I can pass the textbox
ID with which I need to find the index of the tab panel in the parent tabcontainer, so that I can set the activetabindex
to the tabcontainer1
and also set the focus to the textbox
.
Please let me know if there is a way to find the actual panel of the textbox
and set the index to it and also set the focus to the textbox
.
Thanks,
Anandhi
推荐答案
我认为您必须具有有关Parent容器的信息?
或者当您更改它们时,您可以在隐藏的字段中跟踪TabContainer
.使用隐藏字段获取容器名称/索引并对其进行重置.
I think you must be having information about the Parent container?
Or may be you can keep track of theTabContainer
in a hidden field as and when you change them. Use the hidden field to get the container name/index and reset it.
这篇关于将焦点设置为AJAX tabcontainer的tabpanel内的文本框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!