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

How to conditionally hide Table Row inside a GridTemplateColumn

1 Answer 527 Views
Grid
This is a migrated thread and some comments may be shown as answers.
gc_0620
Top achievements
Rank 1
gc_0620 asked on 12 Nov 2010, 10:31 PM
Folks,

Using Radgrid for Asp.net Ajax 2010 V2 with VStudio 2008 SP1.

My question is that how can I conditionally hide a Table Row (in this example: <tr id = "tr2">) that is declared within a Grid Template column. Preferrably within item data bound event if certain conditions are not met based on Other Grid Data. Below is my Template declarations. Thanks

gc_0620 

<columns>
<telerik:="TemplateColumn1"  HeaderStyle-ForeColor="BurlyWood" HeaderText=" Template Column"
                                    DataField="First Name">
                                    <ItemTemplate>
                                        <table style="width: 100%; table-layout: auto; border-collapse: collapse;">
                                            <colgroup>
                                    <col />
                                    <col />
                                    <col />
                                    <col />
                                </colgroup>
                                            <tr id = "tr1">
                                                <td>
                                                 tr1 - A   
                                            
                                                </td>
                                                <td>
                                                 tr1 - B   
                                                 </td>
                                                <td>
                                                   tr1 - C
                                                </td>
                                                <td>
                                                  tr1 - D   
                                                </td>
                                            </tr>
                            <tr id = "tr2">
                                                <td>
                                                 tr2 - A   
                                            
                                                </td>
                                                <td>
                                                 tr2 - B   
                                                 </td>
                                                <td>
                                                   tr2 - C
                                                </td>
                                                <td>
                                                  tr2 - D   
                                                </td>
                                            </tr>
  
                                             
                                        </table>
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>
</columns>

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 15 Nov 2010, 07:27 AM
Hello,


The following links will help you to get started in this.
Grid / Accessing Cells and Rows
Conditional Formatting for rows/cells on ItemDataBound


-Shinu.
Tags
Grid
Asked by
gc_0620
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or