Server Error in Application

An unhandled exception occurred during the execution of the current web request
posts - 60, comments - 75, trackbacks - 50

My Links

News

Archives

Post Categories

ASP.NET

Wednesday, December 26, 2007

Items collection cannot be modified when the DataSource property is set.

Items collection cannot be modified when the DataSource property is set.

This exception

“Items collection cannot be modified when the DataSource property is set.”

occurs when you trying to add some text like “Select” or “None” in combo box (drop down list) in .NET framework window form control. There is no such way to add items in combo box’s items property after you set DataSource. To avoid this you can add one more item in your datasource. For example if you are trying to bind drop down list through DataSet then add one more row into DataSet. There is one more workaround for

“Items collection cannot be modified when the DataSource property is set.”


Related Post:

Association, Aggregation, Composition object relationship

Talent vs Attitude – Harsha Bhogle

What we can learn from Babies

 

Posted On Wednesday, December 26, 2007 7:59 PM | Feedback (1) | Filed Under [ ASP.NET C# Web Services Design Pattern BizTalk unhandled exception ]

Powered by: