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

[Solved] GridHTMLEditorColumn Editor Height/Width

4 Answers 332 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard Brown
Top achievements
Rank 2
Richard Brown asked on 13 Oct 2009, 03:07 PM
Is there any way to set the height and width of the editor in a GridHTMLEditorColumn?

I have tried using the CreateColumnEditor event.  While setting properties for other types of ColumnEditors works as expected, for the RadEditor, the height and width set are not refllected in the rendered control(s).

I have also tried using a GridHTMLEditorColumnEditor, configured with the needed height and width, and setting the ColumnEditorID of the GridHTMLEditorColumn to the GridHTMLEditorColumnEditor ID.  That does not seem tb be recognized at all.

Any help appreciated.

4 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 14 Oct 2009, 04:49 AM
Hello Richard,

Try out the following code to set the size of the editor control and see if it helps:
aspx:
 <telerik:GridHTMLEditorColumn DataField="Address" HeaderText="Address" UniqueName="HTMLEditorColumnUniqueName"
 </telerik:GridHTMLEditorColumn> 

c#:
protected void RadGrid1_ItemCreated(object sender, GridItemEventArgs e) 
    { 
        if (e.Item is GridEditableItem && e.Item.IsInEditMode) 
        { 
            GridEditableItem item = (GridEditableItem)e.Item; 
            RadEditor editor = (RadEditor)item["HTMLEditorColumnUniqueName"].Controls[0]; 
            editor.Height = Unit.Pixel(100); 
            editor.Width = Unit.Pixel(100); 
        } 
    } 

Thanks
Princy.
0
Richard Brown
Top achievements
Rank 2
answered on 14 Oct 2009, 12:31 PM
Problem solved.  Thank you.

I would hope that Telerik would make the necessary changes so that this editor would be consistent with the others,
0
Richard Brown
Top achievements
Rank 2
answered on 14 Oct 2009, 12:33 PM
Problem solved.  Thank you.

I would hope that Telerik would make the necessary changes so that this editor would be consistent with the others,
0
Veli
Telerik team
answered on 16 Oct 2009, 01:32 PM
Hi Richard Brown,

We fixed this issue. Thank you for the involvement.

Best wishes,
Veli
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Grid
Asked by
Richard Brown
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 2
Richard Brown
Top achievements
Rank 2
Veli
Telerik team
Share this question
or