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

activating edit mode

2 Answers 42 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Webster Velasco
Top achievements
Rank 2
Webster Velasco asked on 05 May 2010, 03:15 PM
hi

how can i active the edittemplate of this kind of data grid
      <telerik:RadGrid ID="grdValutazione" runat="server" GridLines="None" 
                                AllowPaging="True" PageSize="20" AllowSorting="True" AutoGenerateColumns="False" 
                                ShowStatusBar="true" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
                                AllowAutomaticUpdates="True"
                                <MasterTableView CommandItemDisplay="none" GridLines="None" 
                                    DataKeyNames="IDPAP,IDAPPEZZAMENTO,IDPARTICELLA" AllowFilteringByColumn="False" AllowSorting="True"
                                    <Columns> 
                                        <telerik:GridTemplateColumn> 
                                            <ItemTemplate> 
                                                <asp:label runat="server" ID="test" text='<%# bind("test") %>' /> 
                                            </ItemTemplate> 
                                            <EditTemplate> 
                                                <asp:textbox runat="server" ID="txt" text='<%# bind("test") %>' /> 
                                            </EditTemplate> 
                                        </telerik:GridTemplateColumn> 
                                    </Columns> 
                                </MasterTableView> 
                            </telerik:RadGrid>    
this is to give u an idea how will be the datagrid
i'd appreciate if u cn provide code and other stuffs bout this thing

thanks and regards
webster

2 Answers, 1 is accepted

Sort by
0
robertw102
Top achievements
Rank 1
answered on 05 May 2010, 05:02 PM
You need to add a GridEditCommandColumn to your RadGrid.
0
Daniel
Telerik team
answered on 06 May 2010, 04:59 PM
Hello Webster,

Depending on your needs, you could use a different approach:

- autogenerated edit column
<telerik:RadGrid
   ID="RadGrid1"
   runat="server"
   AutoGenerateEditColumn="true"
   ....

- declarative edit column (as suggested by Robert)
<MasterTableView>
    <Columns>
        <telerik:GridEditCommandColumn />
    </Columns>
Column types help topic

- declarative button/template column with Edit command
<Columns>
    <telerik:GridTemplateColumn>
        <ItemTemplate>
            <asp:Button ID="EditButton" runat="server" Text="Edit" CommandName="Edit" />
        </ItemTemplate>
    </telerik:GridTemplateColumn>

<MasterTableView>
    <Columns>
        <telerik:GridButtonColumn Text="Edit" CommandName="Edit" />
    </Columns>

Column types help topic

Best regards,
Daniel
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
Grid
Asked by
Webster Velasco
Top achievements
Rank 2
Answers by
robertw102
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or