How to use DataFormatString?

K

Kenny

Hi,

Currently I am using the DataGrid Control. I am able to bind the data to the
column with DataField="HistoryInfo"

How am I going to format the data using DataFormatString so that it can be
display as
e.g. This data created by ...

It will be better if i can call a function from DataFormatString by passing
in the string and length of the character to display in datagrid.

Thanks,
Kenny
 
J

John Saunders

Kenny said:
Hi,

Currently I am using the DataGrid Control. I am able to bind the data to
the
column with DataField="HistoryInfo"

How am I going to format the data using DataFormatString so that it can be
display as
e.g. This data created by ...

DataFormatString="This data created by {0}"

It's just a format string like you would pass to String.Format.

John Saunders
 
K

Kenny

I mean I want to have the function to display number of characters display
in the datagrid.
 
J

John Saunders

Kenny said:
I mean I want to have the function to display number of characters display
in the datagrid.

I'm sorry, but I have no idea what you mean.

John Saunders
 

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

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top