This is a migrated thread and some comments may be shown as answers.

Get the text tiped on filter box

1 Answer 39 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrés David Santacoloma Isaza
Top achievements
Rank 1
Andrés David Santacoloma Isaza asked on 18 May 2011, 06:14 PM
Hi:
I need to get the text tiped on filter box of my gridview.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 19 May 2011, 07:12 AM
Hello Andres,

You can access the filter text box by accessing the Filter Item. Here is a sample code to access the filter item from external button click.
C#:
protected void Button1_Click(object sender, EventArgs e)
   {
      GridFilteringItem filteringItem = (GridFilteringItem)grdEmail.MasterTableView.GetItems(GridItemType.FilteringItem)[0];
      TextBox text=filteringItem["LastName"].Controls[0] as TextBox;
      Response.Write(text.Text);
   }


Thanks,
Shinu.
Tags
Grid
Asked by
Andrés David Santacoloma Isaza
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or