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

Adding a custom row to the top of a RadGrid

0 Answers 33 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 05 Jun 2012, 09:24 PM
I have a rad grid that displays a handful of values IF they exist in the database.  What I want to do is insert a custom row on the grid before any of the data appears that shows the "default values".  Like so,

First row would always show:
<tr>
<td colspan="2">Default Values</td>
<td>Price 1</td>
<td>Price 2</td>
<td>Price 3</td>
<td>Price 4</td>
</tr>

Here are the grid columns:

<Columns>
       <telerik:GridBoundColumn DataField="sourceid" DataType="System.Int16"
           FilterControlAltText="Filter source_id column" HeaderText="Source ID"
           SortExpression="sourceid" UniqueName="sourceid">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="affiliate"
           FilterControlAltText="Filter affiliate column" HeaderText="Affiliate"
           SortExpression="affiliate" UniqueName="affiliate">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="Price1" DataType="System.Decimal"
           FilterControlAltText="Filter Price1 column" HeaderText="Price1"
           SortExpression="Price1" UniqueName="Price1" DataFormatString="{0:C}">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="Price2" DataType="System.Decimal"
           FilterControlAltText="Filter Price2column" HeaderText="Price2"
           SortExpression="Price2" UniqueName="Price2" DataFormatString="{0:C}">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="Price3" DataType="System.Decimal"
           FilterControlAltText="Filter Price3column" HeaderText="Price3"
           SortExpression="Price3" UniqueName="Price3" DataFormatString="{0:C}">
       </telerik:GridBoundColumn>
       <telerik:GridBoundColumn DataField="Price4" DataType="System.Decimal"
           FilterControlAltText="Filter Price4column" HeaderText="Price4"
           SortExpression="Price4" UniqueName="Price4" DataFormatString="{0:C}">
       </telerik:GridBoundColumn>
       <telerik:GridEditCommandColumn UniqueName="EditCommandColumn">
               </telerik:GridEditCommandColumn>
       <telerik:GridButtonColumn CommandName="Delete" Text="Delete">
               </telerik:GridButtonColumn>
   </Columns>

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Shawn
Top achievements
Rank 1
Share this question
or