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
This is a migrated thread and some comments may be shown as answers.
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:
<td colspan="2">Default Values</td>
<td>Price 1</td>
<td>Price 2</td>
<td>Price 3</td>
<td>Price 4</td>

Here are the grid columns:

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

No answers yet. Maybe you can help?

Asked by
Top achievements
Rank 1
Share this question