|
-
Mar 24th, 2003, 04:36 AM
#1
Thread Starter
Lively Member
-
Mar 25th, 2003, 11:07 PM
#2
Fanatic Member
use a datagrid style to create a custom datacolumn style you can then set the output display to be in any format you wish
MSDN has a great little article demonstrating exactly how to customise the datagrid.
-
Mar 26th, 2003, 02:47 AM
#3
Sleep mode
Format these in coming numbers before you put them into the Grid! something similar to this :
VB Code:
MsgBox(Format(32003, "0#-####"))
-
Mar 28th, 2003, 06:50 AM
#4
Thread Starter
Lively Member
but my grid get populated this way..
Dim dv As DataView
dv = x.GetDataView(SQLString)
DataGrid1.DataSource = dv
.... where SQLString is a Procedure Call in which everything is already formatted. Means from backend it comes well formatted. but the same format doesnt show in grid.
-
Mar 28th, 2003, 10:50 AM
#5
PowerPoster
Create a template column, and use a custom binding expression for the label in the column. Something like this:
DataBinder.Eval(Container.DataItem, "MyPriceField", {0:c})
That is how I do it in ASP.Net with the web datagrid. I haven't checked if it works for the Win Forms datagrid.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|