i have 3 list boxes. L1,L2,L3.
the contents are filled from DB. when i select third field in L1, the third fileds in L2 AND L3 SHOULD BE HIGHLIGHTED. tht means if i select any field in L1, corresponding field in L2 and L3 shud be highlighted. highlighted fields index of all list boxes must be same. can some one help me with code please
Loading
Vimal KandasamyPosted Feb 24, 2009, 6:43 AM
its very simple...
after add items in three list boxes,
add the following code in listbox1-SelectedIndexChanged event method.
code in c#:
private void listbox1_SelectedIndexChanged(object sender,EventArgs e)
{
listBox2.SelectedIndex=listBox1.SelectedIndex;
listBox3.SelectedIndex=listBox1.SelectedIndex;
}
try this...
sairamPosted Feb 25, 2009, 1:22 PM
I got it Vimal. Thanks a ton. If possible can u please check my other question posted in same forum.
Thanks a ton once again
Vimal KandasamyPosted Feb 25, 2009, 7:23 AM
Make sure all three list boxes are contains same no of items and values... plz show your code.. then only i can identify your error...
sairamPosted Feb 24, 2009, 9:43 AM
Hi vimal,
Thanks for the Reply. I am getting this error when i run the program.
InvalidArgument=Value of '0' is not valid for 'SelectedIndex'. Parameter name: SelectedIndex