applying edit mask at run time

T

Tin Man

At design time I apply an editmask by putting {0:C} as an attribute to a
column. In a current project I need to apply and change this at run time.

Anyone know how I can do this? Can't find anything in the docs.
Thanks,
Tin Man
 
J

Jos

Tin said:
At design time I apply an editmask by putting {0:C} as an attribute
to a column. In a current project I need to apply and change this
at run time.

Anyone know how I can do this? Can't find anything in the docs.
Thanks,
Tin Man

I assume you're using a BoundColumn?

Try this (VB code):

CType(DataGrid1.Columns(i),BoundColumn).DataFormatString="{0:C}"
 

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

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top