Update/Insert/Delete through queries at database level

Thread is closed for posting
11 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 21 Nov 2006 Link to this post

    Requirements

    RadGrid for ASP .NET version

    RadControls for ASP .NET AJAX version

    4.0.3 and later


    2008.1.415 and later

    .NET version

    1.x, 2.0 (RadGrid for ASP .NET version)

    2.0 and later (RadControls for ASP .NET AJAX version)

    Visual Studio version

    2002/2003 and later

    Programming language

    C#,VB.NET

    Browser support

    all supported by RadGrid for ASP .NET


    all browsers supported by RadControls for ASP .NET AJAX


    Note: This functionality is supported for RadControls for ASP .NET AJAX version 2008.1.415 and later as described in this hep article.
     
    PROJECT DESCRIPTION
    This demo application shows how to perform real update/insert/delete (refreshing the data in the database used for grid source). The data editing operations are performed through Update/Insert/Delete commands build inside the UpdateCommand/InsertCommand/DeleteCommand handlers of the grid.
    Note that the primary field referenced on update operation is stored in the DataKeyNames array of the master table and retrieved through DataKeyValues.
    Additionally, this primary field values are auto-incremented (contained in unique column in the source table) on insert operation, thus avoiding the creation of duplicate identity fields (which can happen when you allow the user to enter primary key value on insert).
  2. 84135F1C-AECD-4548-9D90-4C2B8F961B05
    84135F1C-AECD-4548-9D90-4C2B8F961B05 avatar
    27 posts
    Member since:
    Dec 2006

    Posted 17 Jan 2007 Link to this post

    is this code available in C# code?

    Please can anyone help me.

    Thanks,
  3. C7498A83-7E2E-418C-8791-93EF573A7569
    C7498A83-7E2E-418C-8791-93EF573A7569 avatar
    9934 posts
    Member since:
    Nov 2016

    Posted 17 Jan 2007 Link to this post

    Hi Sara,

    There are several free online convertors which can help you transform the logic into C# code. Below is a link to one of them:

    http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx

    Greetings,
    Stephen
    the telerik team
  4. 750BAF4F-ED0E-4A49-894B-A65CE5CDB0AF
    750BAF4F-ED0E-4A49-894B-A65CE5CDB0AF avatar
    30 posts
    Member since:
    Feb 2007

    Posted 06 Feb 2007 Link to this post

    is there a 2.x version of this example?
  5. 750BAF4F-ED0E-4A49-894B-A65CE5CDB0AF
    750BAF4F-ED0E-4A49-894B-A65CE5CDB0AF avatar
    30 posts
    Member since:
    Feb 2007

    Posted 06 Feb 2007 Link to this post

    this example
    http://www.telerik.com/demos/aspnet/Grid/Examples/DataEditing/AllEditableColumns/DefaultCS.aspx
    is exactly the kind of thing I am interested in understanding.  Where is it?

    Thanks,
    jwL
  6. 6AB3838B-B392-4EDE-97F0-B3F5916D8900
    6AB3838B-B392-4EDE-97F0-B3F5916D8900 avatar
    11100 posts
    Member since:
    Jan 2017

    Posted 07 Feb 2007 Link to this post

    Hi jeff,

    You can use our code-viewer (just below the grid) to review the code of this example for desired language.

    All the best,
    Vlad
    the telerik team
  7. 750BAF4F-ED0E-4A49-894B-A65CE5CDB0AF
    750BAF4F-ED0E-4A49-894B-A65CE5CDB0AF avatar
    30 posts
    Member since:
    Feb 2007

    Posted 07 Feb 2007 Link to this post

    I did use the code and aspx viewer.  What I got wasn't enough to run correctly so it is a bit hard to figure out.  Fortunately finally got one of the other examples to run and it has some of what I was looking for.

    Thanks,
    Jeff Landry
  8. FFB041B3-3E69-4875-97A4-FC4A6153BC41
    FFB041B3-3E69-4875-97A4-FC4A6153BC41 avatar
    26 posts
    Member since:
    Jan 2007

    Posted 08 Feb 2007 Link to this post

    Is this example available as 2.x version in c#?

    TIA
    David
  9. 23C72464-8FC9-43C3-9A12-B431B37B7758
    23C72464-8FC9-43C3-9A12-B431B37B7758 avatar
    11 posts
    Member since:
    Dec 2013

    Posted 09 Feb 2007 Link to this post

    Hello David,

    The file is not available in .net2.0, but it can be easily converted. Additionally, you can use the same logic, in a new .net2.0 project, since the approach is similar.

    Sincerely yours,
    Yavor
    the telerik team
  10. 19255032-024E-417B-BA46-608DEC96FCDD
    19255032-024E-417B-BA46-608DEC96FCDD avatar
    2 posts
    Member since:
    Aug 2011

    Posted 05 Sep 2011 Link to this post

    Hi,

             Can I use this sample http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx for doing the update/insert/delete as i'm using RadGrid1.MasterTableView.AutoGeneratedColumns. Meaning i have no pre-defined GridBoundColumn in my aspx code. 
         
        Meanwhile, is there a way to change the individual row edit button to a 'edit all' button. Meaning one click of button, all the row will become editable. is there any sample code be available?

        pls advise.
  11. 223B1CEC-5BED-4EF9-AC72-22A2976CC4A9
    223B1CEC-5BED-4EF9-AC72-22A2976CC4A9 avatar
    318 posts
    Member since:
    May 2006

    Posted 06 Sep 2011 Link to this post

    Sharon, the same code should work with auto-generated columns, too, as long as you specify the corresponding data source parameters for update/insert/delete operations.

    The quickest means to implement Edit All functionality I can think of is to add a GridButtonColumn to the grid with ButtonType="ImageButton" and CommandName="EditAll" (also make sure you set AllowMultiRowEdit = true for the grid). A list of all commands that are recognized internally by the Telerik grid is available here.

    HTH,
    Nikita
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.