Left-most characters in Data Formatting Expression?

Discussion in 'ASP .Net Datagrid Control' started by Jeff Tolman, May 15, 2004.

  1. Jeff Tolman

    Jeff Tolman Guest

    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
    Jeff Tolman, May 15, 2004
    #1
    1. Advertising

  2. Jeff Tolman wrote:
    > 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

    http://www.4GuysFromRolla.com
    http://www.ASPFAQs.com
    http://www.ASPMessageboard.com

    * When you think ASP, think 4GuysFromRolla.com!
    Scott Mitchell [MVP], May 15, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. H.MuthuKumaraRajan
    Replies:
    3
    Views:
    441
    H.MuthuKumaraRajan
    Feb 4, 2004
  2. =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=

    Help on table align on left of page vs left hanging indent

    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=, Jul 10, 2007, in forum: XML
    Replies:
    2
    Views:
    999
    =?iso-8859-1?q?Jean-Fran=E7ois_Michaud?=
    Jul 16, 2007
  3. NewsMaestro
    Replies:
    0
    Views:
    272
    NewsMaestro
    Aug 20, 2007
  4. xkenneth
    Replies:
    8
    Views:
    336
    Bruno Desthuilliers
    Feb 6, 2008
  5. pc
    Replies:
    2
    Views:
    1,309
    crisgoogle
    Jun 8, 2011
Loading...

Share This Page