This is a migrated thread and some comments may be shown as answers.

Custom filter row not shown when using RadDomainDataSource/ria:DomainDataSource to supply the ItemsSource for radGridView

0 Answers 65 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Roy
Top achievements
Rank 1
Roy asked on 09 Mar 2011, 11:04 AM
Hi

i want to do a custom filter row as the one in the demo
http://demos.telerik.com/silverlight/#GridView/CustomFilterRow
I already included all of the codes in the demo for my project.
However, when i run it by using the radDomainDataSource to supply the itemsSource for my radgridview and it has never shown the custom filter row at all
(if i don't use the radDomainDataSource but just a static collection. Then it shows fine).

Plz help. if possible, can you test ur demo by using the radDomaindatasource to supply the ItemSsource to radgridview. 
Can you include a sample project?

thank

my codes:
A snippet of my radgridview and the codes from ur demo(i just copy EXACTLY )

<telerik:RadGridView
                                   filter:CustomFilterRow.IsEnabled="True"
                                   Background="Gainsboro" IsBusy="{Binding IsBusy,ElementName=unSelectedDocumentARInfoDomainDataSource}"
                                 Name="unSelectedDocumentARInfoRadGridView"
                                 IsEnabled="False"
                                 AutoGenerateColumns="False"
                                 ItemsSource="{Binding Path=DataView,ElementName=unSelectedDocumentARInfoDomainDataSource}"
                                 ShowColumnFooters="True"
                                 IsSynchronizedWithCurrentItem="true"
                                   CanUserDeleteRows="False"
                                 CanUserInsertRows="False"
                                 RowEditEnded="unSelectedDocumentARInfoRadGridView_RowEditEnded"
                                CellValidating="unSelectedDocumentARInfoRadGridView_CellValidating"
                                 ShowGroupPanel="False"
                                  
                                >
               <telerik:RadGridView.Columns>
                   <telerik:GridViewDataColumn DataMemberBinding="{Binding DocumentDate,Mode=TwoWay}" Header="Document Date" DataFormatString="{}{0:d}" IsReadOnly="True" />
                   <telerik:GridViewDataColumn DataMemberBinding="{Binding DocumentARInfoNumber,Mode=TwoWay}" Header="Number" IsReadOnly="True" />
                   <telerik:GridViewDataColumn DataMemberBinding="{Binding OriginalAmount,Mode=TwoWay}" Header="Orig Amount" IsReadOnly="True"  DataFormatString="{}{0:c2}">
                       <telerik:GridViewDataColumn.Footer>
  
                           <TextBlock Text="Total:" />
  
  
                       </telerik:GridViewDataColumn.Footer>
                   </telerik:GridViewDataColumn >
                     
                   <telerik:GridViewDataColumn DataMemberBinding="{Binding DocumentBalance,Mode=TwoWay}" Header="Amount Due" IsReadOnly="True"  DataFormatString="{}{0:c2}">
                       <telerik:GridViewDataColumn.AggregateFunctions>
                           <telerik:SumFunction SourceField="DocumentBalance" ResultFormatString="{}{0:c2}" />
                       </telerik:GridViewDataColumn.AggregateFunctions>
                       <telerik:GridViewDataColumn.Footer>
                           <telerik:AggregateResultsList ItemsSource="{Binding}" />
                       </telerik:GridViewDataColumn.Footer>
                   </telerik:GridViewDataColumn>
  
                   <telerik:GridViewDataColumn DataMemberBinding="{Binding PaymentAmount,Mode=TwoWay}" Header="Payment" UniqueName="Payment"   DataFormatString="{}{0:c2}" >
                       <telerik:GridViewDataColumn.AggregateFunctions>
                           <telerik:SumFunction SourceField="PaymentAmount" ResultFormatString="{}{0:c2}" />
                       </telerik:GridViewDataColumn.AggregateFunctions>
                       <telerik:GridViewDataColumn.Footer>
                           <telerik:AggregateResultsList ItemsSource="{Binding}" />
                       </telerik:GridViewDataColumn.Footer>
                   </telerik:GridViewDataColumn>
                     
                     
               </telerik:RadGridView.Columns>
           </telerik:RadGridView>
           <telerik:RadDomainDataSource AutoLoad="True" LoadingData="unSelectedDocumentARInfoDomainDataSource_LoadingData" Height="0" LoadedData="unSelectedDocumentARInfoDomainDataSource_LoadedData" Name="unSelectedDocumentARInfoDomainDataSource" QueryName="GetUnSelectedDocumentARInfoForDepositPostingQuery" Width="0" Margin="0,0,729,124">
                
               <telerik:RadDomainDataSource.QueryParameters>
                   <telerik:QueryParameter ParameterName="businessEntityId" Value="{Binding ElementName=businessEntityIdRCB,Path=SelectedItem.BusinessEntityId,Mode=OneWay}" />
                       <telerik:QueryParameter ParameterName="paymentDocumentARInfoId" Value="{Binding ElementName=documentARInfoIdTB,Path=Text,Mode=OneWay}"/>
                   </telerik:RadDomainDataSource.QueryParameters>
                     
                         
               </telerik:RadDomainDataSource>

the files which i have used from ur demo are(i downloaded them on 03-08-2011. So i supposed that it is the Latest demo version)
BooleanColumnHeader.xaml /cs
ColumnFilterCell.cs
ColumnFilterCellFactory.cs
CustomFilterRow.cs
DateTimeColumnHeader.xaml / cs
FilteringRow.xaml/cs
NumericColumnHeader.xaml/ cs
TextColumnHeader.xaml/ cs
FilterDescriptorValueToMaskedTextBoxValueConverter.cs


a snippet of my service code on my Server Project .web

public IQueryable<DocumentARInfo> GetUnSelectedDocumentARInfoForDepositPosting(int businessEntityId,string paymentDocumentARInfoId)
      {
          //need to check the businessEntityId = 0 in order to cancel the initial load
          //when the screen has FIRST been opened
          if (businessEntityId == 0)
          {
              return null;
  
          }
          else
          {
              int? paymentDocumentARInfoIdTOInt;
              if (paymentDocumentARInfoId == null || paymentDocumentARInfoId == "")
              {
                  paymentDocumentARInfoIdTOInt = null;
              }
              else
              {
                  paymentDocumentARInfoIdTOInt = Int32.Parse(paymentDocumentARInfoId);
              }
              var result = this.ObjectContext.DocumentARInfoes.Where(a => a.BusinessEntityId == businessEntityId && a.PostingStatusId == 2 && a.DocumentBalance != 0 && a.DocumentType.OriginalDocumentType == 1 && (a.PaymentDocumentARInfoId == paymentDocumentARInfoIdTOInt || a.PaymentDocumentARInfoId == null));
  
              return result;
          }
      }

No answers yet. Maybe you can help?

Tags
GridView
Asked by
Roy
Top achievements
Rank 1
Share this question
or