Click here to Skip to main content
15,892,927 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This is my code this code only worikg for at a one time,my selection wrong i try to select another one tooltip not working.how to fix this eror .any one can help me.




C#
//tooltip

      int ItemCount = dropdownConsignee.Items.Count;
                     for (int i = 0; i < ItemCount; i++)
                     {
dropdownConsignee.Items[i].Attributes.Add("Title", Ds.Tables[0].Rows[i]["Address"].ToString());
                     }
                     dropdownConsignee.Items.Insert(0, new ListItem("Select", "Address"));
                     dropdownConsignee.SelectedItem.Selected = false;
                     dropdownConsignee.Items.FindByText("Select").Selected = true;



Tnahk you
Posted
Updated 22-Sep-13 19:05pm
v4
Comments
[no name] 23-Sep-13 1:56am    
plase help me.
Not sure of the problem. Can you explain again?

1 solution

Whenever you updating the dropdownlist clear the previously bind data.
and use this for selecting the select value

dropdownConsignee.SelectedIndex=0;
 
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