Am I missing something?

4 posts, 1 answers
  1. Carolus
    Carolus avatar
    8 posts
    Member since:
    Apr 2009

    Posted 05 May 2009 Link to this post

    Of all the Grid products I have tried, this has to be the most confusing. Where in the H-E-DoubleHockeySticks does one add the INSERT ROW Command? I have looked at the tutorials, checked my database etc. Is there a Walkthrough that explains how to create a simple grid attached to a table to INSERT records? Why is this so DIFFICULT?
  2. Answer
    Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 05 May 2009 Link to this post

    Carolus-

    I'm very sorry you've had trouble getting started with RadGrid! Let me see if I can point you to some resources that should help:

    DEMO: Automatic Insert/Update/Delete Operations
    http://demos.telerik.com/aspnet-ajax/grid/examples/dataediting/alleditablecolumns/defaultcs.aspx

    DEMO: Command Item (showing you how to enable auto UI for adding new rows)
    http://demos.telerik.com/aspnet-ajax/grid/examples/programming/commanditem/defaultcs.aspx

    DOCS: Inserting Records Using In-Place Edit Form
    http://www.telerik.com/help/aspnet-ajax/grdinsertingvaluesinplaceandeditforms.html

    DOCS: Insert at Database Level with Queries
    http://www.telerik.com/help/aspnet-ajax/grdinsertupdatedeleteatdatabaselevel.html

    If you're using a ASP.NET DataSource control, you really don't do anything! Just connect your RadGrid to the data source control (such as the SqlDataSource) via the DataSourceID property. Assuming your DataSource is configured to allow inserts, you can set the AllowAutomaticInserts property on the Grid to "True" and that's all you'll need to do.

    Hope this helps. Let me know if you get stuck and I'll be happy to provide more input.

    -Todd
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Carolus
    Carolus avatar
    8 posts
    Member since:
    Apr 2009

    Posted 06 May 2009 Link to this post

    Missing this in the MasterTableViewTag. One thing that led to the confusion is the availability of the Edit/Delete commands in the RadGrid Tag.  Thanks for the help.

     

    CommandItemDisplay="TopAndBottom" 

     

     

     

  5. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 06 May 2009 Link to this post

    Happy to help. Often, when a property exists in both RadGrid and MasterTableView, you can set it in either place and the settings will work. The reason is that you can have a Grid with no MasterTableView tag if you're using AutoGenerateColumns = "True."

    And, yes, the CommandItem is the key to exposing the "auto UI" for enabling users to insert new records in to your Grid. You can also customize the CommandItemTemplate if you need to in the future to display whichever buttons your application needs.

    If you get stuck in the future, feel free to come back to the forums for help!

    -Todd
Back to Top