I have a search form there is a search textbox for search by name. i want when i type any text onto the textbox then the names shows on listbox.

and when i click on any name of list box then all data related to this name fill on textbox, radiobutton, datetimepicker, picturebox etc.

i am using sql database and its for win form.

do:

//in button click event:
listBox1.Item.Add(textBox1.Text);

and for setting the text to other controls you do:

private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            radioButton1.Text = listBox1.SelectedItem.ToString();
            textBox1.Text = listBox1.SelectedItem.ToString();
            //and so on..
        }

mitja i want to fill listbox by searching with database
and by this only one textbox can fill on textbox. if i want whole row of list box selected item then????????

if i want whole row of list box selected item then????????

What would that mean?

it means when i want to search any name (VIVEK) then when i key press "V" then all related name related to show on listbox and when again i type "I" then all names related to VI shown on listbox and further. and when i click on any name of listbox then whole row related to that name should be fill on textbox.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.