Radlistbox

2 posts, 0 answers
  1. Ayesha
    Ayesha avatar
    110 posts
    Member since:
    Jun 2009

    Posted 25 Feb 2010 Link to this post

    Hi,

    I do the following and my radlistbox truncates the values displayed in my listbox.

    List

     

    <String> strReportItemsList = new List<String>();

    strReportItemsList.Add(

    "Bala<12");

     

    strReportItemsList.Add(

    "Bala<ce");

     

    strReportItemsList.Add(

    "Bala<ce ref");

     

    strReportItemsList.Add(

    "test12");

     

    strReportItemsList.Add(

    "test?123");

     

     

    m_radReportLstBox.DataSource = strReportItemsList;

    m_radReportLstBox.DataBind();

     

     

     
    When you execute this code,
     in my radlistbox , I get the first item to be correctly dispalyed but the 2nd("Bala<ce" ) and 3rd items  gets truncated and only "bala" gets displayed . Pls clarify this.

    Am I missing something?

     

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 26 Feb 2010 Link to this post

    Hello Ayesha,

    If you’re using >, < and & characters as part of your text property you should always encode them as their entity counterparts. Otherwise, a browser may think you’re starting a tag or entity and mess things up. Hence you can try either of &lt; or &#60 instead of these symbols to achieve the required.

    C#:
     
        protected void Page_Load(object sender, EventArgs e) 
        { 
            List <String> strReportItemsList = new List<String>(); 
     
            strReportItemsList.Add("@Bala&#6012"); 
            strReportItemsList.Add("Bala&#60ce"); 
            strReportItemsList.Add("Bala&lt;ce ref"); 
     
            RadListBox1.DataSource = strReportItemsList; 
            RadListBox1.DataBind(); 
        } 

    Regards,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top