Left-most characters in Data Formatting Expression?

J

Jeff Tolman

Is there any way to specify in the Property Builder a data formatting
expression that only accepts the left-most X-number of characters from the
column?

Thanks to all!

Jeff Tolman
(e-mail address removed)
 
S

Scott Mitchell [MVP]

Jeff said:
Is there any way to specify in the Property Builder a data formatting
expression that only accepts the left-most X-number of characters from the
column?

Nope. Although there are other solutions. One is to use a custom
DataGrid column that limits the # of characters displayed, as shown here:
http://aspnet.4guysfromrolla.com/articles/100202-1.aspx

Another way would be to use a TemplateColumn along with a helper
function that checked to see if the string was too long and, if it was,
it would truncate it. (This technique is also discussed in the article
cited above.)

Hope this helps! :)

--

Scott Mitchell
(e-mail address removed)
http://www.4GuysFromRolla.com
http://www.ASPFAQs.com
http://www.ASPMessageboard.com

* When you think ASP, think 4GuysFromRolla.com!
 

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,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top