如何设置GridView焦点 [英] How to set gridview focus
本文介绍了如何设置GridView焦点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当用户在网格中搜索特定记录时,页面中包含100行的网格.
A Grid consisting of 100 rows in a page,when user search for a particular record in grid.
How to set gridview focus to the searched record.
推荐答案
swathi,
设置Gridview的焦点 [
Hi swat
Set Focus of Gridview[^]
尝试
将重点放在DataGridView单元格 [
Try
Set focus on DataGridView cell[^]
我认为您将重点和选择混为一谈.焦点是控件的状态,仅此而已,它意味着键盘焦点,仅此而已.关于它的其他所有内容只是焦点的视觉反馈.一次只能有一个控件具有焦点.控件内部的所有内容可能有选择也可能没有选择,而不是焦点.
如果是DataGridView
,则通过为其属性CurrentCell
分配一个值来完成选择.
—SA
I think you mix up focus and selection. Focus is a status of a control, nothing else, and it means a keyboard focus, nothing else. Everything else about it is just a visual feedback of a focus. Only one control at a time can have a focus. Whatever you have inside a control may or may not have a selection, not a focus.
In case ofDataGridView
, selection is done by assigning a value to its propertyCurrentCell
.
—SA
这篇关于如何设置GridView焦点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文