One of the fields I use in my grid contains a text (abstract).
In edit mode I want to view the whole text but in gridmode I only want to see 2 or 3 lines (just to see whether something is filled in or not).
How can I restrict the number of lines shown?
Thanks
Daniel
3 Answers, 1 is accepted
0
Sebastian
Telerik team
answered on 31 Mar 2008, 02:44 PM
Hello Daniel,
Although the functionality you requests is not supported out-of-the-box, you may consider enabling column resize and clipping the content of the cells with long text if applicable (specifying fixed width for the corresponding column):
If I use the fixed width, the height of the row becomes larger (as large as needed to include the whole text).
Is there a way to show a dummy field (a leftsting function of the large text).
In that case I could set the abstract-field not visible but editable and the dummy field read-only.
In fact, I'm looking for something similar sowing a total of two values. The values are stored in SQL, the total is not stored but it is prefered to be shown in the grid.
Regards,
Daniel
0
Sebastian
Telerik team
answered on 31 Mar 2008, 03:18 PM
Hi Daniel,
Thank you for the additional explanation. For this purpose consider intercepting the ItemDataBound event of RadGrid and cut the text for each grid item in the respective column when it is not in edit mode (inside e.Item is GridDataItem conditional check).
How to access cells and rows in RadGrid you can see from this online demo: