473,387 Members | 1,486 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

FindByText



I have combobox which is filled from database.
Afterwords i will get a criteria for searching a combo by value.
Hao can i make item in combo to be selected when value in combo match
critiria.
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #1
2 2144
Searching for value:

ComboBox1.SelectedIndex=ComboBox1.Items.IndexOf(Co mboBox1.Items.FindByValue(
"value_to_search_for"))

Searching for text:

ComboBox1.SelectedIndex=ComboBox1.Items.IndexOf(Co mboBox1.Items.FindByText("
text_to_search_for"))

--
Teemu Keiski
MCP, Microsoft MVP (ASP.NET), AspInsiders member
ASP.NET Forum Moderator, AspAlliance Columnist

"acko bogicevic" <ac*******@yahoo.com> wrote in message
news:Ox**************@TK2MSFTNGP12.phx.gbl...


I have combobox which is filled from database.
Afterwords i will get a criteria for searching a combo by value.
Hao can i make item in combo to be selected when value in combo match
critiria.
Thanks
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #2


Thanks very much
Alex

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Maziar Aflatoun | last post by:
Hi everyone, I am trying to select an item in my DropDownList (Everything on 1 .aspx page) and it gives me the following error message. Has anyone encountered this problem before? or any idea...
0
by: Thomas Scheiderich | last post by:
I have a screen that is trying to search a listbox both by FindByText and FindByValue. The FindByValue is working find, but the FindByText is not finding anything. This is even if I copy the text...
0
by: Mark | last post by:
I have a dropdownlist that is dynamically populated. I want to make one of the items be selected by default based on PART of the text that is displayed. However, the FindByText method of the...
3
by: AK | last post by:
Hi, I am using FindByText method of dropdownlist to change the selected item in a dropdownlist like this: DropDownList1.Items("mySelectedText").Selected = True It doesn't seem to be doing...
1
by: JIM.H. | last post by:
Hello, I usee this to find string sD in drop down list and select the value. dllSP.SelectedIndex = dllSP.Items.IndexOf(dllSP.Items.FindByText(sD); Can I get FindByText work with wildcards? So...
2
by: | last post by:
Hi, is it FindByText case Sensitive? How to set it to case insensitive? Thanks in advance.
4
by: Aneri | last post by:
How to use FindByText property of dropdownlist where text to find is in a textbox? i.e if i write, dropdownlist1.Items.FindByText(" ' "& txt1.Text &" ' ").Selected = True i get error ...
6
by: prpleprncs | last post by:
I have a dropdownlist that is selected on page_load. the values of the dropdown comes from the database using a datasource at design time. the value that needs to be selected comes from the...
1
by: raam | last post by:
hi I have a list box with some country names from database. when i click search button the "country" list selecteditem should be selected. but it is not. here is my code where iam using a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.