Apr 23, 2012, 7:00 AM
Remote filter for Header Filter
Dear All,
I have applied PageProxy on my GridPanel and using the remote filter with GridFilter plugin at present. The filter condition has been return on the store refresh data event. Here is the code for filtering
Now when i apply filter with Header Filter the filter is applied on Client side, instead i want to filter on the server side for which i have already returned the code.
Can anyone turn me into right direction?
Thanks,
Huzefa
I have applied PageProxy on my GridPanel and using the remote filter with GridFilter plugin at present. The filter condition has been return on the store refresh data event. Here is the code for filtering
if (!string.IsNullOrEmpty(gridfilters))
{
FilterConditions fc = new FilterConditions(gridfilters);
foreach (FilterCondition condition in fc.Conditions)
{
Comparison comparison = condition.Comparison;
string field = condition.Name;
FilterType type = condition.FilterType;
object value;
switch (condition.FilterType)
{
case FilterType.Date:
switch(comparison)
{
case Comparison.Eq:
sites = from c in sites where c.OnAirDate == DateTime.Parse(condition.Value, new System.Globalization.CultureInfo("en-US")) select c;
break;
case Comparison.Gt:
sites = from c in sites where c.OnAirDate > DateTime.Parse(condition.Value, new System.Globalization.CultureInfo("en-US")) select c;
break;
case Comparison.Lt:
sites = from c in sites where c.OnAirDate < DateTime.Parse(condition.Value, new System.Globalization.CultureInfo("en-US")) select c;
break;
}
break;
case FilterType.String:
value = condition.Value;
value = value.ToString().Replace("'","''");
sites = sites.Where(string.Format("{0}.Contains(\"{1}\")",field,value));
break;
default:
throw new ArgumentOutOfRangeException();
}
}
}
Now i want header filter in my grid panel and want something like on this page https://examples1.ext.net/#/GridPane...Header/Filter/Now when i apply filter with Header Filter the filter is applied on Client side, instead i want to filter on the server side for which i have already returned the code.
Can anyone turn me into right direction?
Thanks,
Huzefa