2013-12-18 56 views
0


我正在填充一些數據到電網,如果用戶需要,我需要過濾一些數據。所以我檢查了過濾選項。但現在過濾條件適用於所有的細胞。所以我需要它在2個細胞,它怎麼可能。需要只過濾Telerik電網中的一些電池


<telerik:RadGrid ID="RadGrid1" runat="server" 
       AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False" 
       CellSpacing="0" DataSourceID="Patdetails" GridLines="None" 
       onneeddatasource="RadGrid1_NeedDataSource" ForeColor="#7090A1" AllowFilteringByColumn="True" 
       > 

<Columns> 
    <telerik:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" 
     HeaderText="Select" UniqueName="TemplateColumn" HeaderStyle-Width="50px" > 
     <ItemTemplate> 
      <asp:CheckBox ID="chk_slct_pat" runat="server" /> 
     </ItemTemplate> 
    </telerik:GridTemplateColumn> 
    <telerik:GridBoundColumn DataField="Name" AllowFiltering="true" 
     FilterControlAltText="Filter column column" HeaderText="Name" 
     UniqueName="column"> 
    </telerik:GridBoundColumn> 
    <telerik:GridBoundColumn DataField="Sex" 
     FilterControlAltText="Filter column1 column" HeaderText="Gender" 
     UniqueName="column1"> 
    </telerik:GridBoundColumn> 
    <telerik:GridBoundColumn DataField="age" 
     FilterControlAltText="Filter column2 column" HeaderText="Age" 
     UniqueName="column2"> 
    </telerik:GridBoundColumn> 
    <telerik:GridBoundColumn DataField="dob" 
     FilterControlAltText="Filter column3 column" HeaderText="DOB" 
     UniqueName="column3"> 
    </telerik:GridBoundColumn> 
    <telerik:GridBoundColumn DataField="hspt" 
     FilterControlAltText="Filter column4 column" HeaderText="Visit ID" 
     UniqueName="column4"> 
    </telerik:GridBoundColumn> 
    <telerik:GridBoundColumn DataField="physician" 
     FilterControlAltText="Filter column5 column" HeaderText="Physician" 
     UniqueName="column5"> 
    </telerik:GridBoundColumn> 
    <telerik:GridBoundColumn DataField="PCU" 
     FilterControlAltText="Filter column6 column" HeaderText="PCU" 
     UniqueName="column6"> 
    </telerik:GridBoundColumn> 
</Columns> 

<FilterMenu EnableImageSprites="False"></FilterMenu> 
      </telerik:RadGrid> 
      <asp:SqlDataSource ID="Patdetails" runat="server" 
       ConnectionString="<%$ ConnectionStrings:testdb_string %>" 
       SelectCommand="SELECT TOP (50) Name,CASE WHEN Sex = 'F' THEN 'Female' ELSE 'Male' END AS Sex, Age,('*'+RTRIM(pv.hs])+('*')) AS hspt, PCU, [Discharge Date],CONVERT(VARCHAR(10), convert(date,[Date of Birth]), 101) as dob,pv.Physician,pv.[Admit Date] FROM Patient_view AS pv WHERE ([Discharge Date] IS NULL) ORDER BY PCU"> 
      </asp:SqlDataSource> 

回答

1

過濾屬性添加到你不不會有過濾器,並設置其列:

<telerik:GridTemplateColumn AllowFiltering="false" Header......... 

Saple

+0

雅我得到了。什麼問題是當我最初設置這個屬性不起作用。後來,當我設置'AllowFiltering =「false」ShowFilterIcon =「false」'時,它對我來說非常完美。感謝您的回答。 – Sivajith

+0

歡迎您。我也必須爭取得到它。 – FeliceM

+0

有時難以設置簡單的東西......現在我也支持這樣的事情 – Sivajith