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

GridHTMLEditorColumn - how to control size in edit form?

2 Answers 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
tony
Top achievements
Rank 1
tony asked on 27 May 2012, 01:15 AM
i have a gridhtmleditorcolumn in a grid. when entering edit mode on an insert, the size of the editor is much larger than i desire. however, i see no properties of the column which would allow me to control it. is it possible to set specific sizes for this control in the edit form?

2 Answers, 1 is accepted

Sort by
0
Accepted
Jayesh Goyani
Top achievements
Rank 2
answered on 27 May 2012, 07:13 AM
Hello Tony,

<telerik:GridHTMLEditorColumn DataField="Name" UniqueName="HtmlColumn"></telerik:GridHTMLEditorColumn>

protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)
        {
            if (e.Item.IsInEditMode && e.Item is GridEditableItem)
            {
                GridEditableItem item = e.Item as GridEditableItem;
                RadEditor edt = item["HtmlColumn"].Controls[0] as RadEditor;
                edt.Width = Unit.Pixel(50);
                edt.Height = Unit.Pixel(50);
            }
        }


Thanks,
Jayesh Goyani
0
tony
Top achievements
Rank 1
answered on 27 May 2012, 03:24 PM
god bless you - that worked
Tags
Grid
Asked by
tony
Top achievements
Rank 1
Answers by
Jayesh Goyani
Top achievements
Rank 2
tony
Top achievements
Rank 1
Share this question
or