I CHECKED THRU MANY SOURCES, LOT OF DISCUSSIONS NO USE. I DON'T WANT TO CHANGE THE WAY I POPULATE MY LIST BOX(LIKE USING DATAREADER METHOD) I NEED TO SOLVE IT WITH DATASET APPROACH
THX
SUREYYA
myDataAdapter.Fill( dsPersonel,"Personel");
DataTable dt =dsPersonel.Tables("Personel");
//Populate listbox
lbPersonel.DataSource =dt;
lbPersonel.Displaymember= "NAME";
lbPersonel.ValueMember="ID";
//data has been retrıevd successfully
private void lbPersonel.SelectedIndexChanged( object sender, EventArgs e)
{
dfPersonelName.Text= lbPersonel.SelectedItems[0].ToString;
}
//here I tried many other alternatives. But no matter what I do I still get the same text in the textbox that is Syste.Data.DataRowVıew

New Topic/Question
Reply




MultiQuote






|