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
960
igHierarchicalGrid combo columns - filtering & Filter condition
posted

Hi

Ignite ui 13.2 MVC 5 (C#.NET, Visual Studio 2013, .Net framework 4.5)

I have an igHierarchicalGrid, but this may also apply to igGrid.

I have a column that uses a combo editor. The combo TextKey field is a string and the TextValue is a number (Int64).

The data is simple code/description in the form:

1 One

2 Two

3 Three

etc.

I have a little Java function to change the displayed value:

function formatMaterial(val) {
var i;
for (i = 0; i < _Materials.length; i++) {
_Material = _Materials[i];
if (_Material.LookupCodeID === val) {
val = _Material.Description;
}
}
return val;
}// formatMaterial

So, my grid cell displays "One" but the value is actually numeric 1.

I have enabled grid filtering.

I am configuring the grid in my MVC controller (much trial and error resulted in my concluding that this is simplest for me).

I have two problems that I would appreciate some help with:

  1. When I run up the page the column filter is operating on the code instead of the description, so I can't filter the grid on this column. ie it is filtering on the number not the description. Can I have it filter on the displayed description instead?
  2. Although I can set the ColumnUpdatingSetting.ComboEditorOptions.FilteringType & RenderMatchItemsCondition I cannot see how to set the FilteringCondition. When configuring an @Html.Infragistics().ComboFor... in the View I can set FilteringCondition to "contains" and it causes the drop down list to filter on "contains" rather than "begins with". As it stands my grid column combo is stuck filtering on "begins with" which is not what I need. I need to filter the drop down list on "contains" so that it finds all items that contain the text that the user it typing.

Regards,

Graeme