How to Add, Edit and Delete

3 posts, 0 answers
  1. King Wilder
    King Wilder avatar
    240 posts
    Member since:
    Oct 2007

    Posted 08 Jan 2012 Link to this post

    I've seen the examples where you can modify the data IN the Grid.  I can't do this since I'm displaying only a few columns in the grid of all the columns available for the data I want to add, edit or delete. So I need to use the standard way of doing this which involves a link in the grid which redirects to a separate view that contains all the fields.

    How do I add links to the Grid so I can redirect to a different page?

    I would also be interested in knowing if it's possible to have the form in a modal Popup over the Grid, but one thing at a time.

    This is a sample of my code:

    <div id="expensegrid">
    </div>
    <script type="text/javascript">
        $(function () {
            $("#expensegrid").kendoGrid({
                dataSource: {
                    serverPaging: false,
                    serverSorting: true,
                    pageSize: 10,
                    transport: {
                        read: {
                            url: '@Url.Action("ExpenseListJson","Expense")',
                            dataType: 'json'
                        }
                    },
                    error: function (e) {
                        alert(e);
                    }
                },
                height: 250,
                sortable: true,
                pageable: true,
                columns: ["CategoryName", "VendorName", "Amount"]
            });
     
        });
    </script>

    I don't think I can add them in the columns property.  Any suggestions on how to do this is appreciated.

    Thanks,

    King Wilder
  2. Rosen
    Admin
    Rosen avatar
    3234 posts

    Posted 09 Jan 2012 Link to this post

    Hello,

    You may use a column template to insert a link into a Grid's column as shown in the following jsFiddle sample:



    Regards,
    Rosen
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. King Wilder
    King Wilder avatar
    240 posts
    Member since:
    Oct 2007

    Posted 09 Jan 2012 Link to this post

    Perfect!  Thanks, that was exactly what I needed!
Back to Top