Databinder.eval Formatting

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...
 
R

rbutch

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...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

format date(s) from sql server 2
grid scroll 2
Intellisense 3
StreamWriter/StreamReader 3
CrystalReport Viewer Export in asp.net 2
comparing two lists 2
FTP a text file 3
Need advice-VB.NET to C# transition 8

Top