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

Get text from the filter-text-box

1 Answer 89 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Savyo
Top achievements
Rank 1
Savyo asked on 12 Jul 2012, 01:06 PM
Hi,
     I have a radgrid in which filtering is enabled. I want to get the text typed in filter text-box on clicking an external button. Any help will be humbly appreciated
Savyo

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 12 Jul 2012, 01:09 PM
Hi,

Please try the following code snippet to get the text from the filtering TextBox.

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
Savyo
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or