别人的不错的总结哦:http://blog.csdn.net/debugingstudy/article/details/8515456
今天碰到一个情况如截图(要求,快速定位到某人,其中,点击A320副驾驶会展开相应的节点):
解决方法:
当触发定位的时候,触发dgUnFlyPersonInfo_InitializeRow即可
private void dgUnFlyPersonInfo_InitializeRow(object sender, InitializeRowEventArgs e)
{
if (e.Row == null) return;
if (string.IsNullOrEmpty(mPcode)) return;
ColumnsCollection gridColumns = this.dgUnFlyPersonInfo.DisplayLayout.Bands[1].Columns;
UltraGridBand band = this.dgUnFlyPersonInfo.DisplayLayout.Bands[1];
foreach (UltraGridRow row in band.GetRowEnumerator(GridRowType.DataRow))
{
if (row.Cells["P_CODE"].Value.ToString().Trim().Equals(mPcode))
row.Activated = true;
}
}