RadGrid EditItem doesnt perform Update

4 posts, 0 answers
  1. Roberto Yudice
    Roberto Yudice avatar
    16 posts
    Member since:
    Mar 2010

    Posted 07 May 2010 Link to this post

    Hi, I have a radgrid with some columns generated automatically and a linqdatasource as the grid's datasource, I have a problem that the command buttons for update and insert in the edit item do not trigger an item command on the grid, I already debugged it an the debugger doesnt step in to the item command method and neither the datasource inserting method trigger so I guess the button commandname is wrong or is empty, is there any way to set these? thanks!
  2. robertw102
    robertw102 avatar
    265 posts
    Member since:
    Jul 2007

    Posted 07 May 2010 Link to this post

    What does your RadGrid declaration look like? Are you using the RadGrid's built-in Automatic Operations or are you handling them yourself?

    If you're using the Automatic Operations, did you set AllowAutomaticInserts/AllowAutomaticUpdates/AllowAutomaticDeletes to true?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Roberto Yudice
    Roberto Yudice avatar
    16 posts
    Member since:
    Mar 2010

    Posted 07 May 2010 Link to this post

    Hi, here is my grid definition
    <telerik:RadGrid ID="rgCatalogoGenerico" runat="server" AllowAutomaticDeletes="True" 
                AllowAutomaticInserts="True" AllowAutomaticUpdates="True" DataSourceID="LinqDataSource1" 
                GridLines="None" AutoGenerateColumns="False" AllowFilteringByColumn="True" AllowPaging="True" 
                AllowSorting="True" 
                Height="350px" onitemcommand="rgCatalogoGenerico_ItemCommand"  
                onitemcreated="rgCatalogoGenerico_ItemCreated"  
                onitemdatabound="rgCatalogoGenerico_ItemDataBound"  
                onitemupdated="rgCatalogoGenerico_ItemUpdated"
                <MasterTableView AutoGenerateColumns="False" DataSourceID="LinqDataSource1" CommandItemDisplay="Top" 
                    NoDetailRecordsText="No se encontraron registros." NoMasterRecordsText="No se encontraron registros." 
                    CssClass="grid_catalogos" > 
                    <ItemStyle CssClass="grid_text" /> 
                    <AlternatingItemStyle CssClass="grid_text" /> 
                    <HeaderStyle CssClass="grid_header" Font-Bold="true" /> 
                    <RowIndicatorColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </RowIndicatorColumn> 
                    <ExpandCollapseColumn> 
                        <HeaderStyle Width="20px"></HeaderStyle> 
                    </ExpandCollapseColumn> 
                    <CommandItemSettings AddNewRecordText="Adicionar" RefreshText="Refrescar" /> 
                    <CommandItemStyle CssClass="grid_command"  /> 
                    <EditFormSettings> 
                        <EditColumn UpdateText="Guardar" CancelText="Cancelar" InsertText="Guardar" ButtonType="LinkButton"
                        </EditColumn> 
                    </EditFormSettings> 
                     
                </MasterTableView> 
                <ClientSettings> 
                    <Scrolling AllowScroll="true" UseStaticHeaders="true" /> 
                </ClientSettings> 
            </telerik:RadGrid> 
    Thanks for your response.
  5. Radoslav
    Admin
    Radoslav avatar
    1564 posts

    Posted 12 May 2010 Link to this post

    Hi Roberto,

    Please check out the following online examples which demonstrate how to perform automatic and manual GRUD operation over the RadGrid with LinqDataSource and LinqToSql:
    http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/linqdatasource/defaultcs.aspx
    http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/programaticlinqupdates/defaultcs.aspx

    I hope this helps

    Regards,
    Radoslav
    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