Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / Disable Filter and Sort for an Individual Column

Disable Filter and Sort for an Individual Column

New Discussion
Andrew McMillan
Andrew McMillan asked on Feb 14, 2014 6:58 AM

For my ID column I show a button to do an action on the row instead of the ID.  I don’t want them to be able to Filter or Sort on this column.  How can I disable the filter and sort for that column?

Here is my helper call:

@(Html.Infragistics()
	.Grid(Model)
	.ID("grdPallets")
	.Width("100%")
	.Height("500px")
	.PrimaryKey("Pallet_ID")
	.AutoGenerateColumns(false)
	.AutoGenerateLayouts(false)
	.Columns(column =>
	{
		column.For(model => model.Pallet_ID).HeaderText("").Template("<input type='button' class='btnPrintPackingSlip' value='Print Packing Slip' data-id='${Pallet_ID}' onclick='printPackingSlip(this)' />");
		column.For(model => model.Pallet_Number).HeaderText("Number");
		column.For(model => model.Pallet_Quantity).HeaderText("Quantity");
		column.For(model => model.Pallet_DateShipped).HeaderText("Date Shipped");
	})
	.Features(features =>
	{
		features.Sorting().Type(OpType.Remote);
		features.Paging().Type(OpType.Remote);
		features.Filtering().Type(OpType.Remote);
	})
	.DataSourceUrl(Url.Action("GetPallets"))
	.Render()
)
Sign In to post a reply

Replies

  • 0
    [Infragistics] Dimka
    [Infragistics] Dimka answered on Feb 13, 2014 12:22 PM

    Hello Andrew,

    Thank you for posting in our community!

     I would suggest you implementing the ColumnSettings for each of the two features:

    @(Html.Infragistics()

    .Grid(Model).ID(“grid1”)

    .Columns(column =>

    {

    column.For(x => x.ProductId).HeaderText(“ID”);

    column.For(x => x.Name).HeaderText(“Name”);

    })

    .Height(“300px”).Width(“800px”).PrimaryKey(“ProductId”)

    .Features(feature =>                                               {

    feature.Filtering().Type(OpType.Remote).ColumnSettings(setting =>

    {

    setting.ColumnSetting().ColumnKey(“ProductId”).AllowFiltering(false).FilterCondition(“equals”);

    setting.ColumnSetting().ColumnKey(“Name”).AllowFiltering(true).FilterCondition(“endsWith”);

    feature.Sorting().Type(OpType.Remote).ColumnSettings(setting =>

    {

    setting.ColumnSetting().ColumnKey(“Name”).AllowSorting(true);

    setting.ColumnSetting().ColumnKey(“Number”).AllowSorting(false);

    });

    })

    .DataSourceUrl(Url.Action(“PagingGetData”)).DataBind().Render())   

    If you have any further questions or if you need additional assistance please let me know.

     

     

    • 0
      Andrew McMillan
      Andrew McMillan answered on Feb 13, 2014 4:56 PM

      Thank you Dimka.  That did exactly what I needed it to.

      • 0
        [Infragistics] Dimka
        [Infragistics] Dimka answered on Feb 14, 2014 6:58 AM

        Hello Andrew,

        If you have any additional questions feel free to update this thread.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Andrew McMillan
Favorites
0
Replies
3
Created On
Feb 14, 2014
Last Post
12 years, 1 month ago

Suggested Discussions

Created by

Created on

Feb 14, 2014 6:58 AM

Last activity on

Feb 11, 2026 3:34 PM