Hello,
I am trying to get the text from each GridFilteringItem on the RadGrid that I am using. I can get the filtering item, but the text value is always an empty string, even when I have something in the filter.
Here is the code:
I am trying to get the text from each GridFilteringItem on the RadGrid that I am using. I can get the filtering item, but the text value is always an empty string, even when I have something in the filter.
Here is the code:
protected
void rgContacts_OnItemCreated(object sender, GridItemEventArgs e)
{
if (e.Item is GridFilteringItem)
{
GridFilteringItem filteringItem = e.Item as GridFilteringItem;
SetGridFilterItemWidth(filteringItem, rg_CONTACTS);
TextBox contactName = (TextBox)filteringItem[CONTACT_NAME_COL].Controls[0];
if (contactName != null)
{
string contactNameFilter = contactName.Text;
if (!string.IsNullOrEmpty(contactNameFilter))
{
var query = from c in contactResultItem where System.Data.Linq.SqlClient.SqlMethods.Like(c.ContactName, "%" + contactNameFilter + "%") select c;
}
}
}
}
contactName.Text is always an empty string.
Suggestions?
Thanks,
Dave