본문 바로가기

C#/DevExpress

[DevExpress] GridControl DataSource에 대용량 데이터 세팅할 시, 느린 이슈 해결하는 방법

728x90

행이 몇만건 되는 데이터를 GridControl DataSource에 바로 대입해서 세팅하려고 하니 몇초나 걸려서 이를 개선하는 작업을 했다. 몇 줄 안 되는 코드로 바꾸기만 했는데 시간이 빠르게 단축됐다. 아래는 해당 코드이다~.~

treeList.DataSource = new List<Code>();
if (!(treeList.DataSource is List<Code> dataSource)) return;
                
dataSource.AddRange(넣으려는 리스트);
treeList.RefreshDataSource();

앗 보니까 treeList네 ㅎ 어쨌든 같지 않을까 ㅎ

728x90