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

To access the text

1 Answer 52 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Steve asked on 08 Feb 2013, 03:14 AM
Hi,

I have a RadGrid, in that, I want to extract the text typed in the filter textbox which is in itemcommand event. I also enabled the filtering of columns. How can I access that? Please provide some solutions.

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 08 Feb 2013, 03:26 AM
Hi,

Try the following code to access the text in the FilterTextBox.

C#:
protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.FilterCommandName)
        {
            GridFilteringItem fitem = (GridFilteringItem)e.Item;
            TextBox filterBox = (TextBox)fitem["ColumnUniqueName"].Controls[0];
            string strTxt = filterBox.Text;
        }
}

Thanks,
Shinu.
Tags
Grid
Asked by
Steve
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or