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

GridHTMLEditorColumnEditor width

2 Answers 78 Views
Grid
This is a migrated thread and some comments may be shown as answers.
jc mag
Top achievements
Rank 1
jc mag asked on 18 Jun 2011, 05:22 PM
When I set the width of a RadEditor in a RadGrid, the content area is wider than the Editor (I mean I have an horizontal scrollbar). How could I avoid that?

My code to set the Editor's width is:

protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e)
{
            if (e.Item is GridEditableItem && e.Item.IsInEditMode)
            {
                GridEditableItem editedItem = e.Item as GridEditableItem;
                GridHTMLEditorColumnEditor editor = (GridHTMLEditorColumnEditor) editedItem.EditManager.GetColumnEditor(colName);
                editor.Editor.Width = Unit.Pixel(750);
           [...]

2 Answers, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 23 Jun 2011, 07:29 AM
Hi,

I tested this in the ColumnTypes demo by setting:
protected void RadGrid2_ItemCreated(object sender, GridItemEventArgs e)
{
    if (e.Item is GridEditableItem && e.Item.IsInEditMode)
    {
 
        GridEditableItem editedItem = e.Item as GridEditableItem;
 
        GridHTMLEditorColumnEditor editor = (GridHTMLEditorColumnEditor)editedItem.EditManager.GetColumnEditor("Notes");
 
        editor.Editor.Width = Unit.Pixel(750);
        editor.Editor.AutoResizeHeight = true;
    }
}

and I could not replicate the issue which you encountered. Can you confirm that you do not have any other width settings - to the grid, through custom styles, etc. If possible, provide us with reproduction steps for this issue and after we manage to replicate it, we will let you know about our findings about it.

All the best,
Tsvetina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
jc mag
Top achievements
Rank 1
answered on 23 Jun 2011, 08:20 PM
Found the problem, I had this setting in my global css file:

html { min-width:950px;}


I don't know how important is this setting (I'm not the author of the css), but removing it solves the problem and the website looks the same as before  :)
Tags
Grid
Asked by
jc mag
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
jc mag
Top achievements
Rank 1
Share this question
or