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
225
Filtering not working for Empty Values.
posted

Hi, 

I am using XamGrid in SL5 where i am using FilterItemTemplate and FilterEditorTemplate to do filtering in the Grid. But i am stuck in the following scenario :-

I need to show 2 values "Stock" and "Non-Stock" in one of the columns in Grid depending upon what values i get from database -  If i get EMPTY value i show "Stock" and if i get the value 'n' i show "Non-Stock". I am using Textbox to filter the Column, now if i enter Stock in the text box to filter the column then basically i am asking to filter the column for Empty value because for Stock, value in the backend is Empty. And filtering doesn't work for Empty values and hence filtering is not working for "Stock" in my case and it shows all the results when entering Stock.

I am stuck in this case for long time. Please provide me the solution to this.

Below is the code snippet where i need to use filtering for Empty values.

<extensions:TextTemplateColumn Key="Entity.nonstockty">
<extensions:TextTemplateColumn.EditorTemplate>
<DataTemplate>
<common:DefaultDictionaryComboBox ItemsSource="{Binding Source={StaticResource DropDownViewModel}, Path=LineTypes}" SelectedValue="{Binding Entity.nonstockty, Mode=TwoWay}" />
</DataTemplate>
</extensions:TextTemplateColumn.EditorTemplate>
<extensions:TextTemplateColumn.FilterItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding Value, Converter={StaticResource VAConverter}}" />
</DataTemplate>
</extensions:TextTemplateColumn.FilterItemTemplate>
<extensions:TextTemplateColumn.FilterEditorTemplate>
<DataTemplate>
<TextBox Text="{Binding Value, Mode=TwoWay, Converter={StaticResource VAConverter}}" />
</DataTemplate>
</extensions:TextTemplateColumn.FilterEditorTemplate>
</extensions:TextTemplateColumn>

Parents Reply Children
No Data