개발언어/3rd Part

Want DropDownList in Column to 'always' display in grid

엔돌슨 2008. 11. 18. 12:51
반응형


컬럼의 속성을 dropdownlist으로 하면 드랍다운으로 나온다.

하지만 클릭시에만 드랍다운로드 된다.

컬럼Type을 버튼으로 설정을하고 아래 코드를 하면
col.CellButtonDisplay = CellButtonDisplay.Always; 라고 설정을하면
항상 버튼으로 나온다.

하지만  드랍다운의 경우는 블가능하다고 한다.
http://forums.infragistics.com/forums/p/9187/35771.aspx#35771
여러 문제가 있단다. 그래서 webcombo나 templatecolumn을 하란다.


블로그에서 게시된 글

The WebGrid doesn't allow you to do this by default.  When dealing with a web application, performance and total markup size become critical.  If you put the same copy of a dropdown control in each cell in a column, it adds significant weight.  The grid actually has a pretty sophisticated mechanism to re-use a single dropdown in each cell.  The constraint is that a single control can't be in 2 places at once.  If you really need to have a dropdown present in each cell, I would recommend using a TemplateColumn, and placing a dropdown/webcombo inside of the cell template. 

Hope this helps,

-Tony