Databinder.eval Formatting

  • Thread starter Thread starter rbutch
  • Start date Start date
R

rbutch

hey guys, as in the example below - where the '$' sign can be formatted in the Databinder.Eval Method
is there a formatting that can supress any zero values from displaying?

or am i gonna have to use OnItemDataBound and pass a handler?
thanks
rik

<%# DataBinder.Eval(Container.DataItem, "RegularHours","{0:c}") %>

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
i've tried and tried going the "OnItemDataBound" way.
in the DataGrid Control tag along with
OnUpdateCommand="UpdateRecord" OnCancelCommand="Cancel" OnEditCommand="EditRecord" , i added in OnItemDataBound="NotZero"
i want to highlight anything that's not zero.(seen a lot of this on the web)

in the code behind i put (just a template - no code yet)

Public Sub NotZero(ByVal sender As Object, ByVal e As DataGridCommandEventArgs)

End Sub

there's nothing there yet, but i still get the "this page cannot be displayed" now, i've been all over the internet (most examples in c# - im vb.net) and they all pretty much do the same thing.
i cant even get the page to display. i'm basically mirroring the same subs i've got for the Edit,Cancel & UPdate methods.

is there something im missing on this?
thanks for any help
rik

**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
Back
Top