WPF 中获取DataGrid 模板列中控件的对像

  #region 当前选定行的TextBox获得焦点
/// <summary>
/// 当前选定行的TextBox获得焦点
/// </summary>
public void SelectedRowTBFocus()
{
if (SelectIndex != -)
{
FrameworkElement item = grid.Columns[].GetCellContent(grid.Items[SelectIndex]);
DataGridTemplateColumn temp = (grid.Columns[] as DataGridTemplateColumn);
SelectTB = temp.CellTemplate.FindName("FinCode", item) as TextBox;
SelectTB.Focus();
}
}
#endregion

获取当前选定行的TextBox对象

WPF 中获取DataGrid 模板列中控件的对像的更多相关文章

  1. wpf 获取datagrid 模板列中的控件

    目前采用的 方法  (网上提供的一款) public static DataGridRow GetRow(DataGrid datagrid, int columnIndex)        {    ...

  2. 在WPF中获取DataGridTemplateColumn模板定义的内容控件

    xaml格式描述: <DataGrid Name="dataGrid" Grid.Row="1" ItemsSource="{Binding}& ...

  3. 在WPF中获取DATAGRIDTEMPLATECOLUMN模板定义的内容控件(转载)

    原文:http://www.cnblogs.com/eric_ibm/p/3772516.html xaml格式描述: <DataGrid Name="dataGrid" G ...

  4. ASP.NET中获取Repeater模板列中LinkButton按钮事件中获取ID等

    前台页面中: <asp:Repeater ID="repComment" runat="server">            <ItemTe ...

  5. WPF中获取TreeView以及ListView获取其本身滚动条的方法,可实现自行调节scoll滚动的位置(可相应获取任何控件中的内部滚动条)

    原文:WPF中获取TreeView以及ListView获取其本身滚动条的方法,可实现自行调节scoll滚动的位置(可相应获取任何控件中的内部滚动条) 对于TreeView而言: TreeViewAut ...

  6. WPF中的数据模板(DataTemplate)(转)

    原文地址 http://www.cnblogs.com/zhouyinhui/archive/2007/03/30/694388.html WPF中的数据模板(DataTemplate)        ...

  7. WPF中不规则窗体与WindowsFormsHost控件的兼容问题完美解决方案

    首先先得瑟一下,有关WPF中不规则窗体与WindowsFormsHost控件不兼容的问题,网上给出的解决方案不能满足所有的情况,是有特定条件的,比如  WPF中不规则窗体与WebBrowser控件的兼 ...

  8. WPF中的数据模板(DataTemplate)

    原文:WPF中的数据模板(DataTemplate) WPF中的数据模板(DataTemplate)                                                   ...

  9. WPF中的数据模板使用方式之一:ContentControl、ContentTemplate和TemplateSelector的使用

    在WPF中,数据模板是非常强大的工具,他是一块定义如何显示绑定的对象的XAML标记.有两种类型的控件支持数据模板:(1)内容控件通过ContentTemplate属性支持数据模板:(2)列表控件通过I ...

随机推荐

  1. 正则指引-量词demo

    class Program { static void Main(string[] args) { string str = "1\"3"; var re1 = Rege ...

  2. struts2:拦截器

    拦截器(Interceptor)是Struts 2的核心组件,Struts 2框架的大部分功能都是通过拦截器来完成的,例如数据校验,国际化,文件上传和下载等.为了实现这些功能,Struts 2框架提供 ...

  3. Unity3D常用代码总结

    1 GUI汇总 function OnGUI() { GUI.Label(Rect(1,1,100,20),"I'm a Label"); //1 GUI.Box(Rect(1,2 ...

  4. SRM 591 div1 275

     topcoder被Appirio收购了 好久没做tc,这个题目挺简单.就是Arena里面看不到图片,只能去tc网站上找题目.http://community.topcoder.com/stat?c= ...

  5. android自定义RadioGroup实现可以添加多种布局

    android自带的RadioGroup是继承自LinearLayout,如果布局的时候不是直接写radiobutton,即radiobutton外面还包了一层容器,这时分组是不成功的,因为查找不到r ...

  6. python string.py 源码分析 三:maketrans

    l = map(chr, xrange(256)) #将ascii转为字符串 _idmap = str('').join(l) del l # Construct a translation stri ...

  7. 实例学习Backbone.js(一)

    前面有两篇文章介绍了Backbone的model.collection和view,那么接下来我想用一个完整的Demo来记录我学习的过程, 单页操作,实现数据的增删改,后台使用json做数据库,通过re ...

  8. sizeof()用法汇总

    sizeof()功能:计算数据空间的字节数 1.与strlen()比较      strlen()计算字符数组的字符数,以"\0"为结束判断,不计算为'\0'的数组元素.      ...

  9. offsetof的使用

    #include <stddef.h> #define offsetof ( TYPE, m)   (size_t )&reinterpret_cast< const vol ...

  10. QImage 图像格式小结

    原地址:http://tracey2076.blog.51cto.com/1623739/539690 嗯,这个QImage的问题研究好久了,有段时间没用,忘了,已经被两次问到了,突然有点解释不清楚, ...