Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sean Dooley 289 posts 528 karma points
    May 24, 2011 @ 16:35
    Sean Dooley
    0

    Front-end admin gridview of nodes

    Currently creating a custom booking/reservation system where a logged in user can access a page that displays all the bookings that have been made. From this page the user can confirm/edit or delete the bookings. I am thinking of implementing this as a gridview in a user control, but I am unsure how to render the gridview with the bookings.

    Below is my code for the page and code-behind so far

    <asp:GridView ID="bookings" runat="server" />
    public partial class Bookings : System.Web.UI.UserControl
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!IsPostBack)
                {
                    var nodes = UmbracoHelper.GetNodesFromXpath("//BookingArea/Booking");

                    bookings.DataSource = nodes;
                    bookings.DataBind();
                }
            }
        }

    At the moment it outputs the node Id, template, NodeTypeAlias, WriterName, CreatorName, WriterId, CreatorId, Path, CreateDate, UpdateDate, Version and NiceUrl, whereas I need it to output the node properties that I have created, for example, restaurant, date, time, etc.

    Any ideas how to go about this? Or any suggestions of another way of trying to achieve this? Is there an Xslt way to display the nodes with the ability to edit/delete them?'

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    May 24, 2011 @ 16:40
  • Sean Dooley 289 posts 528 karma points
    May 24, 2011 @ 16:52
    Sean Dooley
    0

    Thank Jeroen Breuer exactly what I was looking for.

    Now to look at editing the nodes via the front-end.

Please Sign in or register to post replies

Write your reply to:

Draft