varchar string not showing up in itemtemplate in a gridview

Discussion in 'ASP .Net Datagrid Control' started by Stephan Steiner, May 7, 2007.

  1. Hi

    I have your regular GridView with an SQL Data source behind it. One of the
    colums is a varchar column that the user can edit. Now if that column
    contains a string like "a < b <c < d", if you're in the Item view, all that
    can be seen is "a < b". It appears that any "word" starting with a < and
    immediately followed by another character will be suppressed. However, when
    editing an item, the full text is being shown.

    Is there a way I can get the whole text to show in the label (item mode,
    rather than edititem where there's a textbox)? The field is bound via Bind()
    and the column in the gridview is a template column (if I put it into an
    autogenerated column I have the htmlencode property, which, when set to
    true, ensures the text is rendered - just minus the < in front of the c, so
    it's not a 100% solution and I need the column to be a template column
    anyway).

    Does anyone have any idea how I can get my full string to show up in the
    item view in my GridView?

    Regards
    Stephan
     
    Stephan Steiner, May 7, 2007
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.