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

3 posts, 0 answers
  1. Paul
    Paul avatar
    42 posts
    Member since:
    Aug 2005

    Posted 25 May 2007 Link to this post


    RadGrid version

    .NET version

    Visual Studio version

    programming language

    browser support

    all browsers supported by RadGrid

    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

  2. Sebastian
    Sebastian avatar
    9934 posts

    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,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Chinna
    Chinna 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.




Back to Top