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
0
FilterCondition for filter advanced not working
posted

Hi all,

I have a problem in my project, I would like to put "contains" by default in filter advanced but it always displays starts with, although I already put column settting as contains.
Could you help me ?
Below the code.
@(Html.Infragistics()
.Grid<ViewAllPiecesFacture>()
.ID("gridFacture")
.Height((string)ViewBag.HeightList)
.ResponseDataKey("Data") //pointe sur la propriété Data de PagedDataListDto
.PrimaryKey("NoPiece")
.RenderCheckboxes(true)
.AutoGenerateColumns(false)
.AutoGenerateLayouts(true)
.EnableUTCDates(false)
.Columns(column =>
{
column.For(fac => fac.RefPiece).Width("93px");
column.For(fac => fac.DatePiece).Width("95px");
column.For(fac => fac.RaisonSociale).Width("273px").DataType("string");
column.For(fac => fac.RefProduit).Width("110px");
column.For(fac => fac.DesignationProduit).Width("347px");
column.For(fac => fac.TotalUnites).Format("#").Width("92px").Template(Html.TemplateAttributes(new { @style = Style.AlignRight }, "${TotalUnites}")).Width("110px");
column.For(fac => fac.NoCdeEdi).Width("97px");
column.For(fac => fac.Piece).Width("48px");
column.For(fac => fac.CodePrestataire).HeaderText("Code Prestataire").Width("200px");
column.For(fac => fac.PieceFacturee).Hidden(true);
column.For(fac => fac.NoPiece).Hidden(true);
column.For(fac => fac.TypePiece).Hidden(true);
column.For(fac => fac.RefClient).Hidden(true);
})
.Features(features =>
{
features.RowSelectors().EnableCheckBoxes(true).EnableRowNumbering(false);
features.Selection().MultipleSelection(true);

features.Sorting().Type(OpType.Remote).ColumnSettings(cs =>
{
cs.ColumnSetting().ColumnKey("DatePiece").CurrentSortDirection("desc");
});
features.Paging().Type(OpType.Remote)
.PageSize(ViewBag.PageSize)
.PageSizeList(ViewBag.PageSizeList)
.RecordCountKey("TotalDataCount"); //pointe sur la propriété TotalDataCount de PagedDataListDto
features.Filtering().Type(OpType.Remote).Mode(FilterMode.Advanced).ColumnSettings(cs =>
{
cs.ColumnSetting().ColumnKey("RaisonSociale").FilterCondition("contains");
})
.FilterExprUrlKey(string.Empty); // ne pas oublier de mettre la ExpUrlKey à empty sans quoi le décryptage oData ne fonctionne pas
features.Tooltips().Visibility(TooltipsVisibility.Always)
.CursorLeftOffset(15).Style(TooltipsStyle.Tooltip).ShowDelay(100);
features.Resizing();
})
.DataSourceUrl(Url.Action("FactureToGenereList")) // cette action renvoie une serialization JSon d'un pagedDataListDto
.DataBind()
.Render()
)
Thanks.