473,396 Members | 1,804 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,396 software developers and data experts.

How to populate grid view depending on textbox

Hi All,

As of now I am populating grid view using code behind. I want to place a textbox and a button to search the grid view using TIN which is one column in my grid view. I placed the textbox and button on top of grid view.

Please send the process or code to do this...

I am new to programming field. Your help will be greatly appreciated.

Thanks
Dec 25 '08 #1
1 2775
You mean listview, right?

Expand|Select|Wrap|Line Numbers
  1. ListView YourListview = new ListView();
  2.             foreach (ListViewItem YourListViewItems in YourListview.Items)
  3.             {
  4.                 // To search list view text
  5.                 if (YourListViewItems.Text == "What you're searching")
  6.                 {
  7.                     // To select the item you found
  8.                     YourListview.SelectedIndices.Clear();
  9.                     YourListview.SelectedIndices.Add(YourListViewItems.Index);
  10.                 }
  11.  
  12.                 // To search sub items
  13.                 if (YourListViewItems.SubItems[0/*The item you're searching in*/].Text == "What you're searching for")
  14.                 {
  15.                     // Do stuff.
  16.                 }
  17.             }
Dec 30 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: C. David Rossen | last post by:
Hello: I have a registration form for classes. Each class has a fee. I have a drop down box whereby the user chooses his class. There is a textbox with the associated fee. I would like to...
0
by: anna | last post by:
I have a grid with some columns that are BOUND columns. I have three more columns that are TEMPLATE columns with textboxes inside. i need to populate one of the textboxes with information based on...
12
by: pmud | last post by:
Hi, I am using teh following code for sorting the data grid but it doesnt work. I have set the auto generate columns to false. & set the sort expression for each field as the anme of that...
3
by: pmud | last post by:
Hi, I have a web page (asp.net, code:c#). I havean html table with text boxes. Based on the user input , records are displayed in the data grid below it. Now the datagrid has a large no. of...
4
by: Mori | last post by:
I am using masterPage and I need to populate a textbox that is in a content control with data from popup page that is not part of the master page. This code works if no masterpage is involved. ...
0
by: Gian Paolo | last post by:
this is something really i can't find a reason. I have a form with a tabcontrol with tree pages, in the second page there is a Data GRid View. Plus i have a class. When i open the form i...
12
by: brwalias | last post by:
Hi, using .net 2 sql server 2005 Here is my situation: I'm passing a variable in the url from a selection on Page A and need to display the results on the Results page be based on that...
1
by: glamster7 | last post by:
Ok I hope I can explain this properly. I am designing a hairdressing booking system database in a college environment. The thing I'm trying to do at the momemnt I'm a little lost with I have a...
1
by: rogerford | last post by:
I have a grid which i bind with values from Database. I have events to edit and update the grid. I am not using SqlDatasource to connect to DB. Rather i am doing the updating of the grid...
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:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.