activating edit mode

3 posts, 0 answers
  1. Webster Velasco
    Webster Velasco avatar
    115 posts
    Member since:
    Nov 2009

    Posted 05 May 2010 Link to this post

    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. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 05 May 2010 Link to this post

    You need to add a GridEditCommandColumn to your RadGrid.
  3. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 06 May 2010 Link to this post

    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.
Back to Top