Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
Filtering API in HTML Helper
posted

I would like to apply a default filter after the grid is loaded. What is the syntax for applying a filter in an HTML Helper (razor)? I pass the model to the grid constructor as in below -

@(Html.Infragistics().Grid(Model.Groups.AsQueryable())
  .ID("grid1")
  .Columns(column =>                             
  {                                                            
     column.For(c => c.Status).HeaderText("Status");
  })                            
 .Features(features =>                            
 {                                 
     features.Filtering().ColumnSettings(settings =>                                    
          {                                         
               settings.ColumnSetting().ColumnKey("Status").AllowFiltering(true).FilterCondition("Starts With");                                
          });
.DataBind()                                             
.Render()                        
)