XtraTreeList如何定位? 我使用了DevExpress的XtraTreeList,现在必须根据其中能标示出某一行的数据作出行定位选择。请问如何实现 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 DevExpress.XtraTreeList.Nodes.TreeListNode TN;//遍历搜索public void GetNode(DevExpress.XtraTreeList.Nodes.TreeListNodes tc, string pSelected){ foreach (DevExpress.XtraTreeList.Nodes.TreeListNode TNode in tc) { if (TNode.GetValue(this.treeList1.KeyFieldName).ToString() == pSelected) { TN = TNode; } if (TNode.GetValue("OrganizeName").ToString() == pSelected) { TN = TNode; } GetNode(TNode.Nodes, pSelected); }} private void button1_Click(object sender, EventArgs e){ GetNode(this.treeList1.Nodes, this.textBox1.Text); if (TN != null) { //设置焦点 this.treeList1.SetFocusedNode(TN); }}private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e){ DevExpress.XtraTreeList.TreeListMultiSelection mMSTN = this.treeList1.Selection; for (int i = 0; i < mMSTN.Count; i++) { this.textBox1.Text = mMSTN[i][this.treeList1.KeyFieldName].ToString() + ":" + mMSTN[i][this.treeList1.ParentFieldName].ToString(); }} 到smartsoft论坛,专业的devexpress论坛:http://smartsoft.5d6d.com/ MVC3 Razor 无智能提示 语法高亮 咋弄? 当含参数委托作为其它函数参数时怎么添加委托方法实参 怎么写软件变动需求 split控件 如何在安装软件时替换xp2系统内的配置文件??(紧急立即给分) 如何把focus锁定在textbox上不动? 有一个DataSet,我要清除其中一列的数据,怎么做? 我编程生成的xls文件里面的数字变成文本,怎么才能变成数字啊?这样在一打开Excel时,就可以对里面的数字求和等。 看看这个c#简单问题。 微软.NET技术使用有奖调查 [winform]窗口切换消息是多少 在C#中如何将一个.exe文件拆分发送?
public void GetNode(DevExpress.XtraTreeList.Nodes.TreeListNodes tc, string pSelected)
{ foreach (DevExpress.XtraTreeList.Nodes.TreeListNode TNode in tc)
{
if (TNode.GetValue(this.treeList1.KeyFieldName).ToString() == pSelected)
{
TN = TNode;
}
if (TNode.GetValue("OrganizeName").ToString() == pSelected)
{
TN = TNode;
}
GetNode(TNode.Nodes, pSelected);
}
} private void button1_Click(object sender, EventArgs e)
{
GetNode(this.treeList1.Nodes, this.textBox1.Text); if (TN != null)
{
//设置焦点
this.treeList1.SetFocusedNode(TN);
}
}private void treeList1_FocusedNodeChanged(object sender, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs e)
{
DevExpress.XtraTreeList.TreeListMultiSelection mMSTN = this.treeList1.Selection; for (int i = 0; i < mMSTN.Count; i++)
{
this.textBox1.Text = mMSTN[i][this.treeList1.KeyFieldName].ToString() + ":" + mMSTN[i][this.treeList1.ParentFieldName].ToString();
}
}