Click here to Skip to main content
15,922,155 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi........

I have one application in that app i have dropdownlists,text boxes,...etc

i want to search in gridview data.when i entered texboxes text and at the same time i selected dropdownlist then at a time search for two r more controls when i click search button.


i m using MySql database.


how i can search please give me any idea.
Posted

HI,

Every grid have a RowCommand event. In RowCommand event you find the controls.
 
Share this answer
 
Try something like:
C#
//Something similar to this
protected void Gridview_RowDataBound(object sender, DataGridItemEventArgs e)
{
     Textbox tbx = (TextBox)e.Row.FindControl("IWantedToGetThisTextbox");
     if (tbx != null)
     {
         // you got tbx.Text  value here. Do any calculation desired.
        
     }
}
 
Share this answer
 
Comments
Sandeep Mewara 18-May-11 11:16am    
:)

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