Creating/deleting columns in grid dynamically, multirow editing & use of command item template

Thread is closed for posting
3 posts, 0 answers
  1. 6CE1FFDF-5DCB-4FCD-8A65-16BF3C2DF95D
    6CE1FFDF-5DCB-4FCD-8A65-16BF3C2DF95D avatar
    43 posts
    Member since:
    Aug 2005

    Posted 25 May 2007 Link to this post

    Requirements

    RadGrid version

    4.6.1  
    .NET version

    2.0
    Visual Studio version

    2005
    programming language

    C#
    browser support

    all browsers supported by RadGrid


     
    PROJECT DESCRIPTION
    I needed a way to allow users to enter columns of information into a table with a fixed number of rows. This sample shows you how to use multi-row edit to allow a user to add as many new columns as you like. The user can also delete the last column added at any time. In addition the sample uses the command item template.

    Extract the contents of the zip file to a folder. Start VS2005 and open a file based web site at the folder you created and then simply run the project to see how it works.

    Love to have any feedback on any aspects of this sample and how it can be improved.

    I did try adding a delete button to each column to allow the deletion of selected column rather than the last column in the ItemCreated event which worked fine. However, the delete button's CommandName is not caught in the ItemCommand event of the grid and I didn't have time to investigate why.

    Have fun

    Paul
  2. C7498A83-7E2E-418C-8791-93EF573A7569
    C7498A83-7E2E-418C-8791-93EF573A7569 avatar
    9934 posts
    Member since:
    Nov 2016

    Posted 28 May 2007 Link to this post

    Hello Paul,

    Thank you for the sample application. The demo can surely be helpful for other people who would like to add columns on-the-fly using the RadGrid command item and change the column number in the underlying source table instead of altering the grid column structure directly. We appreciate your involvement and added 2500 Telerik points to your account for the post.

    Best regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. C8525EA1-D3BF-457A-9141-B4066D025F68
    C8525EA1-D3BF-457A-9141-B4066D025F68 avatar
    24 posts
    Member since:
    Mar 2008

    Posted 13 Mar 2008 Link to this post

    hello paul,
                         Thank you for the sample application. Please have a  look into my scenario. I have a bound column , which is fixed, then i have to add new template columns based on the user input. if the user enters the column count as 2 i have generate 1 bound column + 2 Template columns.


    Thanks,

    Vinod.

     

Back to Top

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