Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 84751

Custom column filter wont show in ColumnMenu

$
0
0

Hi there,

Were using a custom filter for statuses.

Its working fine when were only using this in the grid properties:

 

1.//Column code in grid
2. 
3.columns.Bound(la => la.StatusName)
4..Filterable(s => s.Multi(true).DataSource(ds => ds.Read(r => r.Action("GetStatuses", "Status").Data("{ field: 'StatusName' }"))))
5. 
6.//Grid propert
7..Filterable(ftb => ftb.Mode(GridFilterMode.Menu))

 

but when i add the .ColumnMenu() property to the grid the filtering on the status column doesnt show at all. I need the show/hide column functions in the columnmenu but cant sacrifice the custom status filter.

 

The serverside code for the datasource looks like this:

 

01.publicActionResult GetStatuses(stringfield)
02.{
03.    var statuses = Context.GetAll<Status>(false);
04. 
05.    var viewModels = (from s instatuses
06.                      select newStatusVm() { StatusName = s.Key })
07.        .ToList();
08. 
09.    returnJson(viewModels, JsonRequestBehavior.AllowGet);
10.}

 

Am i missing something obvious here?

 

Thankful for any input.

 

 


Viewing all articles
Browse latest Browse all 84751

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>