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

[Solved] RadControls for Grid

3 Answers 129 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vijayaragavan
Top achievements
Rank 1
Vijayaragavan asked on 22 Sep 2009, 11:24 AM
Hello,

      I have cretaed a rad grid view and populate the values to grid dynamically. And i need to place a check bok column inside the grid.
I used Headertemplate and ItemTemplate to place the check box column. Also i have set the proprty for "Allow Filtering" to true. On executing the application am getting the filteration for check box column too. I dont want this filtering in check box column alone. Please can you help me in this.

       I have attached my aspx grid code with is mail.

<telerik:RadGrid  ID="radSimpleGrid" runat="server" AllowPaging="True" AllowSorting="True"
                GridLines="Both" AutoGenerateColumns="False" AllowFilteringByColumn="true" Skin="Office2007">
                <FooterStyle BackColor="#CCCCCC" />
                <MasterTableView TableLayout="Fixed" PageSize="10">
                    <NoRecordsTemplate>
                        No records found
                    </NoRecordsTemplate>
                    <Columns>
                        <telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn">
                            <HeaderTemplate>
                             <asp:CheckBox id="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox>
                            </ItemTemplate>
                        </telerik:GridTemplateColumn>
                    </Columns>
                </MasterTableView>
                <PagerStyle Mode="NumericPages"></PagerStyle>
                <HeaderStyle HorizontalAlign="Center" />
                <ClientSettings ClientEvents-OnRowContextMenu="RowContextMenu" EnableRowHoverStyle="true">
                    <ClientEvents OnRowContextMenu="RowContextMenu"></ClientEvents>
                    <Selecting AllowRowSelect="true" />            
                </ClientSettings>
            </telerik:RadGrid>



3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Sep 2009, 11:48 AM
Hello Vijayaragavan,

You can set the AllowFiltering property for the GridTemplateColumn to false to achieve the required.
aspx:
<telerik:GridTemplateColumn AllowFiltering="false" UniqueName="CheckBoxTemplateColumn"
                            <HeaderTemplate> 
                             <asp:CheckBox id="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox> 
                            </HeaderTemplate> 
                            <ItemTemplate> 
                                <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox> 
                            </ItemTemplate> 
 </telerik:GridTemplateColumn> 

Thanks
Shinu.
0
Casey
Top achievements
Rank 1
answered on 22 Sep 2009, 11:50 AM
Hello,

Please try setting the "AllowFiltering" property of the GridTemplateColumn to False.

<telerik:GridTemplateColumn UniqueName="CheckBoxTemplateColumn" AllowFiltering="False">  
                            <HeaderTemplate> 
                             <asp:CheckBox id="headerChkbox" OnCheckedChanged="ToggleSelectedState" AutoPostBack="True" runat="server"></asp:CheckBox> 
                            </HeaderTemplate> 
                            <ItemTemplate> 
                                <asp:CheckBox id="CheckBox1" OnCheckedChanged="ToggleRowSelection" AutoPostBack="True" runat="server"></asp:CheckBox> 
                            </ItemTemplate> 
</telerik:GridTemplateColumn> 
 

I hope this helps!
Casey
0
Vijayaragavan
Top achievements
Rank 1
answered on 24 Sep 2009, 05:34 AM
Hi shinu & Casey,

       Thanks a lot. it works fine.

Regards,
vijay r
Tags
Grid
Asked by
Vijayaragavan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Casey
Top achievements
Rank 1
Vijayaragavan
Top achievements
Rank 1
Share this question
or