Devexpress中gridControl的主从表展开所有明细表方法
        ///展开所有明细
        private List<int> expandedRows = new List<int>();
        void ExpandAllDetails(GridView gridview)
        {
            if (gridview.RowCount>0)
            {
                expandedRows.Clear();
                gridview.BeginUpdate();
                try
                {
                    int dataRowCount = gridview.DataRowCount;
                    int rHandle = 0;
                    for (rHandle = 0; rHandle < dataRowCount; rHandle++)
                    {
                        expandedRows.Add(rHandle);
                    }
                }
                finally
                {
                    gridview.EndUpdate();
                }
                ExpandDetails(gridview);
            }

        }
        private void ExpandDetails(GridView view)
        {
            GridViewInfo info = (GridViewInfo)view.GetViewInfo();
            foreach (GridDataRowInfo rInfo in info.RowsInfo)
            {
                if (expandedRows.Contains(rInfo.RowHandle))
                {
                    view.ExpandMasterRow(rInfo.RowHandle);
                    expandedRows.Remove(rInfo.RowHandle);
                }
            }
        }
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇