This is a migrated thread and some comments may be shown as answers.

Overriding ItemDataBound behavior on Grid Export

1 Answer 16 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rodney
Top achievements
Rank 2
Rodney asked on 25 Oct 2016, 10:42 AM

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 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 

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

 

1 Answer, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 28 Oct 2016, 09:02 AM
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.
Tags
Grid
Asked by
Rodney
Top achievements
Rank 2
Answers by
Viktor Tachev
Telerik team
Share this question
or