How to use DataFormatString?

  • Thread starter Thread starter Kenny
  • Start date Start date
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
 
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
 
I mean I want to have the function to display number of characters display
in the datagrid.
 
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

Back
Top