How to limit size of a GridHTMLEditorColumn

6 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 30 Mar 2009 Link to this post

    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
  2. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 02 Apr 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 03 Apr 2009 Link to this post

    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
  5. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 06 Apr 2009 Link to this post

    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.
  6. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 06 Apr 2009 Link to this post

    I mean the column having the higher heigth value.
  7. Tsvetoslav
    Admin
    Tsvetoslav avatar
    1823 posts

    Posted 08 Apr 2009 Link to this post

    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.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017