Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get trouble when binding data to combobox

Status
Not open for further replies.

nguyentaiuyenchi

Technical User
Nov 5, 2001
39
VN
- I have a class, it call 'UserManager'. The properties UserDataSourse is presented as below:
/// <summary>
///
/// </summary>
public DataSet UserDataSourse
{
get
{
DataSet dataset;
dataset=mLibraryItem.Copy();
return dataset;
}
}
mLibraryItem is a dataset that store current data for User.

- At form1 in application, I add a combobox, then I perform bind data at formload event:

usermanager=new UserManager();

comboBox1.DataSource=usermanager.UserDataSourse.Tables["User"];

comboBox1.DisplayMember="UserName";

==> The number of Item in combox is correct but the Username don't display in combobox, System.Data.DataRowView was used instead

Please help me to solve this problem.

Thanks,
Uyen Chi

Uyen Chi
Software developer
 
Uyen Chi,
Is your IDE SharpDevelop (#Develop)? If yes, this might be a problem with the SharpDevelop IDE. I use Visual Studio .NET at work and have no problems with data binding. At home, however, I use SharpDevelop and experience the exact same problem you're having. I'll go to the SharpDevelop site to try to find out if it has something to do with their software. After all, their IDE is just in beta version.

JC

Friends are angels who lift us to our feet when our wings have trouble remembering how to fly...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top