NullDisplayText attribute

11 posts, 1 answers
  1. Aaron
    Aaron avatar
    20 posts
    Member since:
    Oct 2012

    Posted 26 Sep 2012 Link to this post

    I'm finding RadGridView doesn't respect the "NullDisplayText" attribute given within my model. I found a post 6 years ago that says "Yeah, we should do that..."

    I haven't seen anything else. Is there a good, extensible workaround? Will this be added in the future?
  2. Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 27 Sep 2012 Link to this post

    Hi,

     Can you clarify what is NullDisplayText?

    Regards,
    Vlad
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  3. DevCraft banner
  4. Aaron
    Aaron avatar
    20 posts
    Member since:
    Oct 2012

    Posted 27 Sep 2012 Link to this post

    http://msdn.microsoft.com/en-us/library/cc679253(v=vs.95).aspx 

    I know the GridView handles "DataFormatString" but it doesn't seem to handle NullDisplayText.
  5. Answer
    Vlad
    Admin
    Vlad avatar
    11100 posts

    Posted 01 Oct 2012 Link to this post

    Hi,

     This will be added for our upcoming Q3 2012 release (after three weeks). 

    Greetings,
    Vlad
    the Telerik team

    Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

  6. Robert
    Robert avatar
    4 posts
    Member since:
    Mar 2016

    Posted 23 Apr in reply to Vlad Link to this post

    And in Q1 2016 it appears not to be working.  NullDisplayText is completly ignored (though DataFormatString is applied).
  7. Robert
    Robert avatar
    4 posts
    Member since:
    Mar 2016

    Posted 23 Apr in reply to Robert Link to this post

    Ah, I was trying to use it in WPF; it is sad it isn't there though :)
  8. Yoan
    Admin
    Yoan avatar
    1066 posts

    Posted 26 Apr Link to this post

    Hello,

    It is working in my WPF test project. You can find it attached. However, if you have applied DataFormatString of the column, the NullDisplayText attribute will not be respected.

    Regards,
    Yoan
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  9. Robert
    Robert avatar
    4 posts
    Member since:
    Mar 2016

    Posted 27 Apr in reply to Yoan Link to this post

    I have a column of weights, but for some rows, the weight is unknown (not 0, but really unknown).  I would like it to say "4 kg" in the cell that belongs to a row with a weight that is 4 kg, and "" (the empty string) in the cell that belongs to a row with an unknown weight.

     

    This functionality exist with plain bindings (via TargetNullValue) for ordinary TextBoxes.  Syncfusion SfDataGrid (a competitors alternative to RadGridView) supports this.  I am fine with needing to do things different with Telerik controls, but surprised that such a simple feature is missing.

  10. Yoan
    Admin
    Yoan avatar
    1066 posts

    Posted 27 Apr Link to this post

    Hello Robert,

    Maybe I am missing something, but the TargetNullValue is working as expected. I have attached a modified version of my previous attached project. I have used the TargetNullValue property in the DataMemberBinding of the column and it is respected. 

    Regards,
    Yoan
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
  11. Robert
    Robert avatar
    4 posts
    Member since:
    Mar 2016

    Posted 02 May in reply to Yoan Link to this post

    So we can now agree that this doesn't work.  FormatString combined with TargetNullValue supresses the later.  I am opening a ticket then.
  12. Stefan Nenchev
    Admin
    Stefan Nenchev avatar
    277 posts

    Posted 04 May Link to this post

    Hi Robert,

    I just wanted to update the forum thread that  the behavior is logged as a bug in our Feedback and Ideas Portal at the following page - StringFormat in DataMemberBinding does not respect TargetNullValue property. We have investigated it in the ticket you have raised and confirmed the undesired effects.

    Regards,
    Stefan Nenchev
    Telerik
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top
DevCraft banner