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

Row grid label change.

1 Answer 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 23 Dec 2013, 05:48 PM

I have a rad grid control that displays the row labels the same as the header names.  It looks like this is by design and not sure if this can be changed or not.  I simply want to change the name of the label  Cars:  to just Car:

I tried various changes (ie., Text="Car" on label)  and nothing seems to work.  Open to any comments on this.  Thanks.


Sample Grid:

               Cars                                   Model                                         Year
>           Lexus                                 ES                                           2010                    

 Cars:                Lexus                

Model:              ES

Year:                2010

Update  Cancel


____________________________________________________________________________________



  <telerik:GridTemplateColumn HeaderStyle-Width="500px" HeaderText=Cars">
                    <EditItemTemplate>
                        <qhi:CarSelector ID="cpsCar" runat="server" />
                    </EditItemTemplate>
                    <ItemTemplate>
                        <asp:Label ID="lblCarText" runat="server"></asp:Label>
                    </ItemTemplate>
 </telerik:GridTemplateColumn>

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Dec 2013, 03:59 AM
Hi Mark,

In order to have the Edit form to display Car, you have to set the GridTemplateColumn HeaderText="Car". Another way is to create a Template editform so as to display a customized editform.

ASPX:
<telerik:GridTemplateColumn HeaderStyle-Width="500px" HeaderText="Car">
    <EditItemTemplate>
        <qhi:CarSelector ID="cpsCar" runat="server" />
    </EditItemTemplate>
    <ItemTemplate>
        <asp:Label ID="lblCarText" runat="server"></asp:Label>
    </ItemTemplate>
</telerik:GridTemplateColumn>

OR

<telerik:GridBoundColumn DataField="Cars" HeaderText="Cars" UniqueName="Cars">
</telerik:GridBoundColumn>
. . . . . . .
<EditFormSettings EditFormType="Template">
    <FormTemplate>
        Car:
     <qhi:CarSelector ID="cpsCar" runat="server" />
 . . . . . .
    </FormTemplate>
</EditFormSettings>

Thanks,
Princy
Tags
Grid
Asked by
Mark
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or