收集问题中的焦点控制 [英] Focus control in collection problem
问题描述
我有一个网格,我想在创建新行后聚焦一个单元格
I have a Grid and I want to focus a cell after creating a new row
部分无效的ComentariosAddAndEditNew_Execute()
{
this.Comentarios.SelectedItem = Comentarios.AddNew();
var control = this.FindControlInCollection("Contenido",this.Comentarios.SelectedItem);
this.Comentarios.SelectedItem.Details.Dispatcher.BeginInvoke(()=> {control.Focus();});
}
partial void ComentariosAddAndEditNew_Execute()
{
this.Comentarios.SelectedItem = Comentarios.AddNew();
var control = this.FindControlInCollection("Contenido", this.Comentarios.SelectedItem);
this.Comentarios.SelectedItem.Details.Dispatcher.BeginInvoke(() => { control.Focus(); });
}
在尝试了几种可能性之后,我有了这段代码..仍然给了我例外.在两次处理之间无效的操作.
I have this code, after trying several possibilities.. still giving me the the exception. Operation not valid between proccess.
Ynx
SebaXOR
推荐答案
Hi Sebaxor
Hi Sebaxor
以下是与您的问题相关的一些讨论话题.希望这些对您有所帮助.
Here are some thread discussed related your issue. Hope these are helpful to you.
希望获得帮助...
致谢
这篇关于收集问题中的焦点控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!