02-26-04 05:36 PM
Hi George,
add the following to your datagrid to display the current state:
(<b>State</b>: <%#DataBinder.Eval(Container, "DataItem.State")%> )
The complete grid (I just tested it) looks like this:
<asp:datagrid runat="server" id="displayGrid"
autogeneratecolumns="False" allowpaging="True" pagesize="10" cellpadding="3"
cellspacing="3" borderwidth="0" pagerstyle-nextpagetext="Next 10"
pagerstyle-prevpagetext="Previous 10" showheader="False">
<columns>
<asp:templatecolumn>
<itemtemplate>
<h4><a href="<%#DataBinder.Eval(Container,
"DataItem.URL")%>"><%#DataBinder.Eval(Container.DataItem,
"DisplayName")%></a></h4>
<p>
<%#DataBinder.Eval(Container.DataItem,
"PlaceHolders['PostingSummary'].Html")%><br />
<sup>(<b>Created</b>: <%#DataBinder.Eval(Container,
"DataItem.StartDate")%> )</sup><br>
(<b>State</b>: <%#DataBinder.Eval(Container, "DataItem.State")%> )
</p>
</itemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
Cheers,
Stefan
--
This posting is provided "AS IS" with no warranties, and confers no rights.
"George Leithead" <george.leithead@NaeSphamMeh.DavisLangdon-uk.com> wrote in
message news:403e17cd$0$10335$ed9e5944@reading.news.pipex.net...
> Hi all,
>
> I have a generic channel render, that uses a datagrid to display a
postings collection:
>
> <asp:datagrid runat="server" id="displayGrid"
autogeneratecolumns="False" allowpaging="True" pagesize="10" cellpadding="3"
> cellspacing="3" borderwidth="0" pagerstyle-nextpagetext="Next 10"
pagerstyle-prevpagetext="Previous 10" showheader="False">
> <columns>
> <asp:templatecolumn>
> <itemtemplate>
> <h4><a href="<%#DataBinder.Eval(Container,
"DataItem.URL")%>"><%#DataBinder.Eval(Container.DataItem,
> "DisplayName")%></a></h4>
> <p>
> <%#DataBinder.Eval(Container.DataItem,
"PlaceHolders['PostingSummary'].Html")%><br />
> <sup>(<b>Created</b>: <%#DataBinder.Eval(Container,
"DataItem.StartDate")%> )</sup>
> </p>
> </itemtemplate>
> </asp:templatecolumn>
> </columns>
> </asp:datagrid>
>
> When the user is in presentation mode, this is fine. However, when the
user switched to Edit mode, I want to display the posting
> status/state.
>
> As you can appreciate, the list of published postings can be very
different from the work in progress postings.
>
> Basically, what I want is something like below:
>
> [When in Published Mode]
> ==============
> Posting Title (Status: Published)
> First Posting (Status Published)
>
> [When in Edit mode]
> ==============
> Posting Title (Status: Published)
> Another Posting Title (Status: Saved)
> Yet Another Posting Title (Status: Waiting For Editor Approval)
> First Posting (Status Published)
>
> Does anyone have an idea of how I can achieve this?
>
>
[ Post a follow-up to this message ]
|