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

Filter RadGrid Programmatically

1 Answer 103 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alex
Top achievements
Rank 1
Alex asked on 24 May 2014, 09:13 PM
Hi,

I am trying to programmatically (Server side) to filter a rad grid based on combo boxes and radio buttons and before the page loads for the user.

using VB.NET I am using this on LoadComplete (I know this is two different methods, but neither work to an extent).
Dim rowStateColumn As GridColumn = RadGrid1.MasterTableView.GetColumnSafe("Comp_ProjectCount")
 
        rowStateColumn.CurrentFilterFunction = GridKnownFunction.GreaterThan
        rowStateColumn.CurrentFilterValue = 0
 
        RadGrid1.MasterTableView.FilterExpression = "([Comp_ProjectCount] > 0 ')"
        RadGrid1.Rebind()


The first option puts in the value of 0 in that column but doesn't display the results filtered only the entire data source.
The second option just doesn't do anything from what I can tell. (I had to sent LINQ to False as it just errored out as I found out in a previous thread).

Any ideas why this doesn't work? Or how to get it to work please?

Thanks,
Alex

1 Answer, 1 is accepted

Sort by
0
Alex
Top achievements
Rank 1
answered on 24 May 2014, 09:21 PM
Spelling error on my part. Sorry.
Alex
Tags
Grid
Asked by
Alex
Top achievements
Rank 1
Answers by
Alex
Top achievements
Rank 1
Share this question
or