Overriding ItemDataBound behavior on Grid Export

2 posts, 0 answers
  1. Rodney
    Rodney avatar
    40 posts
    Member since:
    Mar 2015

    Posted 25 Oct Link to this post

    I have a situation where I have some very long columns. In ItemDataBound I just substring the first 80 characters and put it in the item.text, and the full struing in the ToolTip. The problem is when I export to Excel I want to get the entire contents of the data item, not the truncated version that's in the cell. How can I avoid this It seems that in ItemDataBound I can't test on Exporting.

    The other option I've thought of is to somehow put the entire contents of the data item in the cell and maybe not have it wrap.

    What would be the recommended solution?

    Rodney

     

  2. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 28 Oct Link to this post

    Hello Rodney,

    In order to implement the behavior you can try the following approach. Keep the whole text in the cell in the Grid. Then add a custom CSS rule that would hide the unnecessary text. For that you can use the text-overflow property.


    Give the approach a try and let me know how it works for you.


    Regards,
    Viktor Tachev
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top