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

How to limit size of a GridHTMLEditorColumn

5 Answers 124 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 30 Mar 2009, 03:14 PM
Hello,

To avoid having a very large field in each row when radEditor cell content has a large size, I want to display only part of the content for my GridHTMLEditorColumn.
But as content is Html, it seems uneasy to decide to truncate at some fixed length.
Is there a way to do this, telling RadEditor to display only part of content or eventually fixing the row height and having content scrolling for the RadEditor cell ?

Thanks

CS

5 Answers, 1 is accepted

Sort by
0
Tsvetoslav
Telerik team
answered on 02 Apr 2009, 06:00 AM
Hello Christian Surieux,

You can get a reference to the editor in the grid's ItemCreated event and manipulate its dimensions as per your scenario:

        if (e.Item is GridEditableItem && e.Item.IsInEditMode)  
        {                          
            RadEditor rade = (e.Item as GridEditableItem)["EditorColumn"].Controls[0] as RadEditor;  
       
            rade.Height = Unit.Pixel(100);  
 
        }  

I hope this helps.

Best Regards,
Tsvetoslav
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
CSurieux
Top achievements
Rank 2
answered on 03 Apr 2009, 12:38 PM
Hello Tsvetoslav ,

Thanks, but according your sample you think that I want to reduce the editor height when in editmode, this is not the case.

It appears that the row height in normal display mode is increased to some max size according size of the text in the higher column.
In my case this column is the one related to RadEditor.

So how to set a max row size to each row in such a way thta even with a higher cell it stay at this value ?

Thanks

CS
0
Tsvetoslav
Telerik team
answered on 06 Apr 2009, 11:28 AM
Hello Christian Surieux,

I am not sure I correctly understand you question. What exactly do you mean by "higher column"? Could you also post the aspx for your editor column.

Thank you.

Looking forward to your feedback.

Sincerely yours,
Tsvetoslav
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
CSurieux
Top achievements
Rank 2
answered on 06 Apr 2009, 09:52 PM
I mean the column having the higher heigth value.
0
Tsvetoslav
Telerik team
answered on 08 Apr 2009, 12:30 PM
Hello Christian Surieux,

Indeed, this seems to be an issue with the RadEditor - I have notified the responsible team. Meanwhile, I'd suggest that you switch off the editor's modules:
                        <Modules> 
                            <telerik:EditorModule Visible="false" /> 
                        </Modules> 

and also add the following css class to your page:

div.RadGrid td .RadEditor td  
{  
   padding:0;  
 
I hope this helps.

Best Regards,
Tsvetoslav
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Tsvetoslav
Telerik team
CSurieux
Top achievements
Rank 2
Share this question
or