Channel Render when in Edit mode, display the Posting Status
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Web Servers reviews > Microsoft Content Management Server > Channel Render when in Edit mode, display the Posting Status




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Channel Render when in Edit mode, display the Posting Status  
George Leithead


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
02-26-04 04:36 PM

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" al
lowpaging="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'].H
tml")%><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 ]



    Re: Channel Render when in Edit mode, display the Posting Status  
Stefan [MSFT]


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
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 ]



    Sponsored Links  




 





   All times are GMT. The time now is 02:15 AM.      Post New Thread    Post A Reply      
  Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register