Ask a Question related to ASP.NET General, Design and Development.
-
Bojesphob #1
Nested Repeater question
Can someone help? I
have a nested repeater in which I wish to format one of
the bits of data in currency. I know that the code for the
regular repeater (which works fine in parent) is
databinder.eval(Container.DataItem, "Net", "{0:c}") . BUT
I use that code in the nested repeater and IT DOES NOT
WORK!!!! In that code I have DataBinder.Eval
(Container.DataItem, "Reduction", "{0:c}") and the page
gives me the error "Error: System.Web.HttpException:
DataBinder.Eval: 'System.Data.DataRow' does not contain a
property with the name Reduction."
If I only use Container.DataItem("Reduction") it works
fine! I was told over on asp.net that the code I tried to
use it what I should use, and that it works fine for them,
but I cannot get it to work! I spelled everything
correctly, and as far as I know bound everything
correctly, but it still will not work! Does anyone have a
working example of a nested repeater with a formatted
column? I really need to get this fixed, I have other
projects which need to get done, but this takes priority,
Help!
Bojesphob Guest
-
linkbutton in nested repeater doesnt fire
Hi! I've got a page with a datalist and a nested repeater in it to get "categories" and "sub categories". I've got link button in the datalist and... -
Nested repeater databinding question
http://ejaconsulting.com/nestedrepeater/NestedRepeater.txt runs -
Error with Nested Repeater
You probably won't have much luck here either since this is a "classic" asp group. But are you sure that "Reduction" is a property of your object... -
Nested Repeater - 3 levels - datasource
I have extended the example at http://support.microsoft.com/default.aspx?scid=kb;EN- US;306154 to build a webform page with 3 layers of nested... -
Nested Repeater Controls
I have extended the example at http://support.microsoft.com/default.aspx?scid=kb;EN- US;306154 to build a webform page with 3 layers of nested... -
David Wier #2
Re: Nested Repeater question
Try this - - create a Function:
Function doFormat(sItem as Decimal) ' Here, you can use whatever datatype
you have assigned to the field
Dim s as String
s=String.Format("{0:c}", sItem)
doFormat=s
end function
Then, in your nested DataList - -
<%# doFormat(Container.DataItem("Reduction"))
David Wier
[url]http://aspnet101.com[/url]
[url]http://aspexpress.com[/url]
"Bojesphob" <jschmidt@pca-star.com> wrote in message
news:0bb601c3582d$fa40cff0$a301280a@phx.gbl...> Can someone help? I
> have a nested repeater in which I wish to format one of
> the bits of data in currency. I know that the code for the
> regular repeater (which works fine in parent) is
> databinder.eval(Container.DataItem, "Net", "{0:c}") . BUT
> I use that code in the nested repeater and IT DOES NOT
> WORK!!!! In that code I have DataBinder.Eval
> (Container.DataItem, "Reduction", "{0:c}") and the page
> gives me the error "Error: System.Web.HttpException:
> DataBinder.Eval: 'System.Data.DataRow' does not contain a
> property with the name Reduction."
> If I only use Container.DataItem("Reduction") it works
> fine! I was told over on asp.net that the code I tried to
> use it what I should use, and that it works fine for them,
> but I cannot get it to work! I spelled everything
> correctly, and as far as I know bound everything
> correctly, but it still will not work! Does anyone have a
> working example of a nested repeater with a formatted
> column? I really need to get this fixed, I have other
> projects which need to get done, but this takes priority,
> Help!
David Wier Guest



Reply With Quote

