User Profile & Activity

Muhammad Ismail Member

Many Thanks Yudi and Team,

This solved the filtering problem.

Here is the observeable collection


ObservableCollection<MyData> GridDatafin = new ObservableCollection<MyData>();

 

Here is struct


 public struct MyData
        {
            private string m_keyword;
            private string m_sources;
            
            public string keyword
            {
                get
                {
                    return this.m_keyword;
                }
                set
                {
                    this.m_keyword = value;
                }
            }
            public string sources
            {
                get
                {
                    return this.m_sources;
                }
                set
                {
                    this.m_sources = value;
                }
            }
            
        }

 

Here is XAML for gridview and custom filtering


<Intersoft:UXGridView Name="uXGridView1"  SelectionUnit="Row" AutoGenerateColumns="False"  CanUserFilterColumns="True" CanUserExport="True" VerticalAlignment="Stretch" Height="478">
                        <Intersoft:UXGridView.Columns>
                            <Intersoft:UXGridViewTextColumn  Header="Keyword" CanUserFilter="True" CanUserSort="True"  Width="300" Binding="{Binding keyword}">
                               
                            </Intersoft:UXGridViewTextColumn>
                            <Intersoft:UXGridViewTextColumn Header="Sources" CanUserSort="True"  CanUserFilter="True" Width="120"   Binding="{Binding sources}" >
                                <Intersoft:UXGridViewTextColumn.FilterItems>
                                    <Intersoft:UXDataFilterItem Content="Google">
                                        <Intersoft:UXDataFilterItem.Filter>
                                            <Intersoft:CompositeFilterDescription LogicalOperator="And" >
                                                <Intersoft:FilterDescription PropertyName="sources" Operator="IsEqualTo"  Value="Google"/>
                                            </Intersoft:CompositeFilterDescription>
                                        </Intersoft:UXDataFilterItem.Filter>
                                    </Intersoft:UXDataFilterItem>
                                    <Intersoft:UXDataFilterItem Content="Yahoo">
                                        <Intersoft:UXDataFilterItem.Filter>
                                            <Intersoft:CompositeFilterDescription LogicalOperator="And" >
                                                <Intersoft:FilterDescription PropertyName="sources" Operator="IsEqualTo"  Value="Yahoo"/>
                                            </Intersoft:CompositeFilterDescription>
                                        </Intersoft:UXDataFilterItem.Filter>
                                    </Intersoft:UXDataFilterItem>
                                    <Intersoft:UXDataFilterItem Content="Bing">
                                        <Intersoft:UXDataFilterItem.Filter>
                                            <Intersoft:CompositeFilterDescription LogicalOperator="And" >
                                                <Intersoft:FilterDescription PropertyName="sources" Operator="IsEqualTo"  Value="Bing"/>
                                            </Intersoft:CompositeFilterDescription>
                                        </Intersoft:UXDataFilterItem.Filter>
                                    </Intersoft:UXDataFilterItem>
                                </Intersoft:UXGridViewTextColumn.FilterItems>
                            </Intersoft:UXGridViewTextColumn>
                           
                        </Intersoft:UXGridView.Columns>
                    </Intersoft:UXGridView>

 Its itemsource property is set in source when it populates observable collection for the first time. This is thread progress changed event code which populates the observable collection.


ArrayList arrlst = (ArrayList)e.UserState;
            for (int m = 0; m < arrlst.Count; m++)
            {
                string[] rs = (String[])arrlst[m];
                MyData dt = new MyData();
                dt.keyword = rs[0];
                dt.sources = rs[1];
                GridDatafin.Add(dt);
            }

 


I have tested with both QueryOperation="Client"  and QueryOperation="Server" 


Now all the data gets populated perfectly. Its just the filter.


Let me know thanks

Posted: September 30, 2011 12:46 PM

Hello,


Many Thanks Handy. It worked out.

Posted: September 30, 2011 10:48 AM

Hello,


I have done all the exact same steps before and now again. Do not know what is wrong? Is there any utility which would check the license?

All times are GMT -5. The time now is 11:54 PM.
Previous Next