ClientItemTemplate - Shows Null when Attribute Value empty

2 posts, 0 answers
  1. Fergal
    Fergal avatar
    23 posts
    Member since:
    Jun 2012

    Posted 10 Dec 2013 Link to this post

    I have defined a ClientItemTemplate on my RadComboBox for using during LoadOnDemand, so far, this seems to be working great. However I have a value attached to the return objects as an Attribute that is sometimes empty/null. When this happens, the record in the dropdown shows "null" or "undefined" (if I don't attach the data).

    I need to set up the template so that when this happens, it just shows a blank cell instead, but I can't seem to figure out how to do this.

    My template looks like this:

    <table>
      <tr><td>#=Attributes.DOB#</td></tr>
    </table>

    My Code looks like:

    var dobValue = string.Empty;
    item.Attributes.Add("DOB", dobValue);
  2. Fergal
    Fergal avatar
    23 posts
    Member since:
    Jun 2012

    Posted 10 Dec 2013 Link to this post

    Never mind. I figured out the issue. My code was heading down a different branch to the one I thought.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top