Re: format nested repeater
From: Martin Dechev (detcheff__at_hotmail.com)
Date: 09/21/04
- Next message: Kevin Spencer: "Re: Jpeg GIF Image sizes"
- Previous message: Hermit Dave: "Re: question"
- In reply to: Dan Poincelot: "Re: format nested repeater"
- Next in thread: Dan Poincelot: "Re: format nested repeater"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 21 Sep 2004 15:13:50 +0200
Hi,
So what is the type of
DataBinder.Eval(e.Item.DataItem, "SubProcess")?
What happens if you try:
MainHeading = DataBinder.Eval( e.Item.DataItem, "SubProcess").ToString();
I'm sorry but I'm just guessing as I don't have the code to reproduce the
behavior you're experiencing.
Greetings
Martin
"Dan Poincelot" <dpoincelot@masonmadison.com> wrote in message
news:#gaa4V9nEHA.3868@TK2MSFTNGP11.phx.gbl...
> Hi Martin, thanks for the response, I now can get the itemdatabound for
> the child repeater to fire. However, it can't seem to locate column
> names in the child repeater, the code is below (I put the error mesage
> below the code):
>
> protected void CategoryRepeater_ItemDataBound(object sender,
> System.Web.UI.WebControls.RepeaterItemEventArgs e)
> {
> Response.Write("it fired!");
>
> //subprocess, need to only show it once for each list
>
> LabelSubProcess = (Label)e.Item.FindControl("LabelSubProcess");
>
> MainHeading = (string)DataBinder.Eval( e.Item.DataItem, "SubProcess" );
>
> if (MainHeading == PastHeading)
> {
> LabelSubProcess.Text = "";
> }
> else
> {
> LabelSubProcess.Text = (string)DataBinder.Eval( e.Item.DataItem,
> "SubProcess" );
> }
>
> PastHeading = MainHeading;
>
> //End subprocess code
>
> }
>
> Here is the error message:
>
> Specified cast is not valid.
> Description: An unhandled exception occurred during the execution of the
> current web request. Please review the stack trace for more information
> about the error and where it originated in the code.
>
> Exception Details: System.InvalidCastException: Specified cast is not
> valid.
>
> Source Error:
> Line 259: MainHeading = (string)DataBinder.Eval( e.Item.DataItem,
> "SubProcess" );
>
> Thanks again for any more help you can offer.
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!
- Next message: Kevin Spencer: "Re: Jpeg GIF Image sizes"
- Previous message: Hermit Dave: "Re: question"
- In reply to: Dan Poincelot: "Re: format nested repeater"
- Next in thread: Dan Poincelot: "Re: format nested repeater"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|