Click here to Skip to main content
15,911,039 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i want to display the fecthed values of listbox at time of showing into same listbox the fechted values is hightlighted or selected in same listbox
Posted
Comments
bbirajdar 7-Jul-12 3:03am    
Not clear..

1 solution

C#
public void BindData(int fid)
       {
           dt = new DataTable();
           dt = _familyHist.GetFamilyHistory(2, fid);
           if (dt.Rows.Count > 0)
           {
               lstMedicalCondition1.DataSource = dt;
               lstMedicalCondition1.DisplayMember = dt.Columns[2].ColumnName;
               lstMedicalCondition1.ValueMember = dt.Columns[1].ColumnName;
           }
           rtbAdditionalInfo1.Text = dt.Rows[0]["AdditionalInfo"].ToString();
       }
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900