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

[Solved] DetailTable Filter expression not working??

2 Answers 162 Views
Grid
This is a migrated thread and some comments may be shown as answers.
mac
Top achievements
Rank 1
mac asked on 16 Apr 2009, 09:44 PM
I have been at this now for awhile. didn't want to post as it seems a pretty simple thing to do.
no matter how i write it, I cannot get my detailtable filter expression to work.

Note the poststat of the mastertableview is different than the poststat of the detailtable.
<telerik:RadGrid  id="RadGrid2" runat="server"   
 GridLines="Horizontal" 
    AllowPaging="True"  AutoGenerateColumns="False">  
    <MasterTableView FilterExpression="([ActivityStatus] = 'Vacant') AND ([poststat] = 'Qualifying')"   
     DataKeyNames="Recordid">  
        <Columns> 
            <telerik:GridBoundColumn DataField="Recordid" DataType="System.Int32" HeaderText="Recordid" Visible="False" 
                ReadOnly="True" SortExpression="Recordid" UniqueName="Recordid">  
            </telerik:GridBoundColumn> 
            <telerik:GridBoundColumn DataField="PostingNumber" /> 
            <telerik:GridBoundColumn DataField="poststat" /> 
            <telerik:GridBoundColumn DataField="ActivityStatus" /> 
        </Columns> 
        <DetailTables> 
            <telerik:GridTableView Name="IA" FilterExpression="([AppStat] = 'Late')"   THIS IS NOT FILTERING!!!
            Caption="Internal Applicants"  DataKeyNames="Applicationid" 
                DataSourceid="AllApps"  runat="server">  
                <ParentTableRelation> 
                    <telerik:GridRelationFields DetailKeyField="Apps" MasterKeyField="Recordid" /> 
                </ParentTableRelation> 
                <Columns> 
                    <telerik:GridBoundColumn DataField="SenrBalance" HeaderText="Balance"  UniqueName="SenrBalance" /> 
                    <telerik:GridBoundColumn  DataField="PostStat" HeaderText="PostStat"   UniqueName="AppStat" /> 
                </Columns> 
            </telerik:GridTableView> 
            </DetailTables> 
        </MasterTableView> 
</telerik:RadGrid> 
 
      
         <asp:SqlDataSource ID="AllApps" runat="server" ConnectionString="<%$ ConnectionStrings:PHCJobPostsConn %>" 
             SelectCommand="Applicants" SelectCommandType="StoredProcedure">  
             <SelectParameters> 
                <asp:SessionParameter Name="Apps" SessionField="PostNum" /> 
              
             </SelectParameters> 
         </asp:SqlDataSource> 
    
    
    Protected Sub RadGrid2_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles RadGrid2.NeedDataSource  
        RadGrid2.DataSource = functions.dt(String.Format("exec SProc '706680'", Session("empID")))  
    End Sub 

this thing is driving me crazy
mac

2 Answers, 1 is accepted

Sort by
0
mac
Top achievements
Rank 1
answered on 17 Apr 2009, 04:45 PM
Bump...
I could really use some advice on this. I have a detailtable with a gridbound column with a unique name of 'AppStat'. it is a varchar column that returns either "Safe" or "Late". in my gridTableView i have the following AppStat = 'Late'... I have tried ([AppStat] = 'Late') , (AppStat = 'Late') and [AppStat] = 'Late'. I understand case is relevant. No matter how i filter, the filter is not appying to the table. Please help.. I really don't want to have to create alternate Datasources to simply filter items.

0
Yavor
Telerik team
answered on 22 Apr 2009, 07:21 AM
Hello mac,

I have already addressed the issue set forth in the support ticket opened on the matter.
To avoid duplicate posts, we can continue our communication there.

All the best,
Yavor
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
mac
Top achievements
Rank 1
Answers by
mac
Top achievements
Rank 1
Yavor
Telerik team
Share this question
or