Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format in .xsd

Status
Not open for further replies.

JoeZim

MIS
Sep 11, 2003
87
US
I've created a .xsd file with a number of tables. I've also created a BLL class for each table, which get called by ObjectDataSource controls.

On one of my pages, I've got a DetailsView Control where the DataSourceID changes based on which type of detail is being selected for display from a FormView. The FormView has linkbuttons which dictate the DataSourceID to call.

Therefore, the columns are auto-generated each time. I assign the DataSourceID for the DetailsView in code, as shown by the following code:

Code:
Protected Sub lnkExceptions_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Session("Table") = "Exceptions"
        Label1.Text = "Exceptions"

        dvDetailsViewControl.DataSourceID = "ExceptionDataSource"
        dvDetailsViewControl.DataBind()
        dvDetailsViewControl.Visible = True
End Sub

Protected Sub lnkInsurance_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        Session("Table") = "Insurance"
        Label1.Text = "Insurance"

        dvDetailsViewControl.DataSourceID = "InsuranceDataSource"
        dvDetailsViewControl.DataBind()
        dvDetailsViewControl.Visible = True
End Sub

Is there any way to format System.Double fields in the .xsd file itself so they will always come over in the proper format (i.e. {0:c}) since I do not have any bound columns to work with? I can change the caption, but I cannot figure out how to format the fields, if it is even possible.
 
So far, I've resorted to formatting the currency fields in my SQL statements:

SELECT CONVERT(varchar, CAST(EXPOSURE AS money), 1)

Just seems like there has to be a better way to do this...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top