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

[Solved] TextArea Cell in Grid-mode=Edit

5 Answers 203 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Gregg
Top achievements
Rank 1
Gregg asked on 11 Aug 2010, 05:42 PM
Hi,   I have a grid which has 5 columns and one column with much text in it.  I render them for dislplay like this (with an HTML TextArea)
        .Columns(col =>
        {
            col.Command(cmd => cmd.Edit()).Width(200);
            col.Bound(c => c.mname).Title("Name").Width(200).ReadOnly();
            col.Bound(c => c.ip).Title("IP Address").Width(100).ReadOnly();
            col.Bound(c => c.devicetype).Title("Device Type").Width(100).ReadOnly();
            col.Bound(c => c.macaddress).Title("MacAddress").Width(100).ReadOnly();
            col.Bound(c => c.notes).Title("Notifications(Notes)").Width(200).Template(t => { 
                %> <%= Html.TextArea("TextArea1",t.notes, 3, 50, "wrap=HARD") %> <%});

        })
This works fine.  I can see 1000 or so Characters in the scrollable TextArea.  
But when I go to Edit mode for any row,  the row  "BLOWS OUT" .   All the column widths are ignored,  the TextArea is ignored and the 1000 characters are displayed in one, very wide Text Box.  
 I can edit and save the text and have tried several alternatives, none of which help.  
Here is the URL for my server-side edit mode: 
http://localhost:53748/Notes/Index/43131?Grid-mode=edit
Does anyone know how to apply an HTML.TEXTAREA to the Telerik  grid-mode=edit()  ???      

5 Answers, 1 is accepted

Sort by
0
Pål
Top achievements
Rank 1
answered on 18 Jan 2011, 01:11 PM
Hi,

Did you ever find a solution to this?

Best regards
Pål Eilertsen
0
Gregg
Top achievements
Rank 1
answered on 18 Jan 2011, 02:13 PM
No Pal I have not yet found a solution and I have, in fact moved on....
I no longer am working w/ Telerik or even with .NET so thanks for asking but I am doing something else in Ruby-on-Rails right now.
Regards,
Gregg
0
Pål
Top achievements
Rank 1
answered on 18 Jan 2011, 10:08 PM
I solved it by using a custom editor template for the given property. The template was a Html.TextAreaFor.

Pål
0
Roland
Top achievements
Rank 1
answered on 25 Oct 2011, 04:22 PM
@Pal

Do you have an example of the texarea code? I am using the following and it's not mapping back to the model because the Request parameter is being send as "Text.Text".

<%= Html.TextAreaFor(o => o.Text, 3, 30, null) %>

I figure I can just manually assign the value but seems like a bit of a hack.
0
krish
Top achievements
Rank 1
answered on 12 Apr 2012, 11:33 PM
Hey,

How did you do that, could you please share a piece of code.

Thanks
kris
Tags
Grid
Asked by
Gregg
Top achievements
Rank 1
Answers by
Pål
Top achievements
Rank 1
Gregg
Top achievements
Rank 1
Roland
Top achievements
Rank 1
krish
Top achievements
Rank 1
Share this question
or