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
575
Filtering grid - JS Error
posted

I am attempting to follow this example to get filtering on my grid.  Using Razor I have it set up like this

@( Html.Infragistics().Grid<InstrumentList>() 
    .ID("igGrid1") 
    .Columns(column => 
    {
        column.For(x => x.ProcessNo).DataType("int").HeaderText("Process No");
        column.For(x => x.SubProcess).DataType("string").HeaderText("Sub Process");
        column.For(x => x.Stream).DataType("int").HeaderText("Stream");
        column.For(x => x.EquipmentCode).DataType("string").HeaderText("Equipment Code");
        column.For(x => x.SequenceNumber).DataType("string").HeaderText("Sequence Number");
        column.For(x => x.EquipmentIdentifier).DataType("string").HeaderText("Equipment Identifier");
        column.For(x => x.Tag).DataType("string").HeaderText("Tag");     
    })
    .Features(features => 
    { 
        features.Sorting().Mode(SortingMode.Single).ColumnSettings(settings => 
        {
            settings.ColumnSetting().AllowSorting(true);
           
        }); 
        features.Selection().MouseDragSelect(true).MultipleSelection(true).Mode(SelectionMode.Row);
        features.Filtering().ColumnSettings(settings =>
        {
            settings.ColumnSetting().ColumnKey("Tag").AllowFiltering(false).FilterCondition("startsWith");
        });
    }) 
    .ClientDataSourceType(ClientDataSourceType.JSON) 
    .DataSourceUrl(Url.Action("GetInstrumentLists")) 
    .Width("100%") 
    .Height("700px") 
    .DataBind() 
    .Render()  

 

I also have this listed at the top of my layout file:

<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.11.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/Infragistics/ig.ui.js")" type="text/javascript"></script>

I am getting an error '$.tmpl is not a function' from line 17683 of ig.ui.js.  It goes away if I remove the filtering lines in the grid setup.  Could it be because I'm using jquery 1.5.1 and the script is built on jquery 1.4.4?  1.5.1 is the default version that comes with an MVC 3 project. Any ideas?