This is a migrated thread and some comments may be shown as answers.

knockout.js using datasource binding - how to format money and datetime data

0 Answers 48 Views
MVVM
This is a migrated thread and some comments may be shown as answers.
#CaughtUp#
Top achievements
Rank 1
#CaughtUp# asked on 22 Jul 2012, 11:29 PM
Hi,

I am using MVC4 single page application on VS 2010 together with upshot.js and knockout.js.
I am using the following MVVM javascript (as my view-model js):

var dsCharges = upshot.RemoteDataSource({
providerParameters: { url: constants.serviceUrlItem, operationName: "UpdateCharge" },
provider: constants.provider,
        entityType: "Charge:#My.Models"
       }).refresh();
ko.applyBindings(new ChargeViewModel(dsCharges));


As you can see above, I am using a datasource binding to populate my grid. Data is displayed on my grid.
I need help to format my data which are of type money and datetime.
How do I format it using knockout.js? Can you please show me an example code snippet on how to do this?

Many thanks,

No answers yet. Maybe you can help?

Tags
MVVM
Asked by
#CaughtUp#
Top achievements
Rank 1
Share this question
or