Hi all,
I am confuse when reading ms-help://telerik.aspnetajax.radcontrols.2010.Q1/telerik.aspnetajax.radgrid.2010.Q1/custom-option-for-filtering.html help file.
I have 3 columns (name=text,startdate=datetime,enddate=datetime). The name column is set to VaryByDataType. On the startdate, I want the filter item nofilter, equalto and greaterthanorequalto. For the enddate, I would like nofilter, equalto and lessthanorequalto.
I can't seem to get it right without affecting the other columns.
Thanks,
Khanh
I am confuse when reading ms-help://telerik.aspnetajax.radcontrols.2010.Q1/telerik.aspnetajax.radgrid.2010.Q1/custom-option-for-filtering.html help file.
I have 3 columns (name=text,startdate=datetime,enddate=datetime). The name column is set to VaryByDataType. On the startdate, I want the filter item nofilter, equalto and greaterthanorequalto. For the enddate, I would like nofilter, equalto and lessthanorequalto.
I can't seem to get it right without affecting the other columns.
Protected Sub RadGrid1_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles RadGrid1.Init |
Dim menu As GridFilterMenu = RadGrid1.FilterMenu |
Dim i As Integer = Menu.Items.Count - 1 |
While i >= 0 |
If menu.Items(i).Text = "NoFilter" Or menu.Items(i).Text = "Contains" Or menu.Items(i).Text = "GreaterThanOrEqualTo" Then |
'menu.Items.RemoveAt(i) |
ElseIf menu.Items(i).Text = "Custom" Then |
menu.Items(i).Text = "LessThanOrEqualTo" |
Else |
menu.Items.RemoveAt(i) |
End If |
System.Math.Max(System.Threading.Interlocked.Decrement(i), i + 1) |
End While |
End Sub |
Thanks,
Khanh