We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

how to allow both enter keys for textarea field and save batch update(multiple records) of the grid well.

Thread ID:





131620 Jul 20,2017 01:51 AM UTC Jul 21,2017 03:37 AM UTC ASP.NET MVC 1
Tags: Grid
Dongil Shin
Asked On July 20, 2017 01:51 AM UTC

Hello, I'm trying to bulk batch update in syncfusion grid.

however, there's a text field which is a text area (StarContext) that will allow enter key(new lines).
also, I modified the option .AllowKeyboardNavigation(false).

The symptom is as I remember it worked on normal row by row save.
but in case of Batch Update, I could not use textarea for the field that allow enter key(new lines)
and could not save/changed status(the upper left part icons, save icon - never active) for the records as well.

so, my point is how to both allow text area enter key(new lines) and save BatchUpdate well.

please give me response.
Thank you.

                                    .Datasource(ds => ds.Json((IEnumerable<StarGridViewModel>)Model.Where(o => o.DomainArea == "Family").ToList())
                                    .ToolbarSettings(toolbar =>
                                        toolbar.ShowToolbar().ToolbarItems(items =>
                                    .TextWrapSettings(wrap => { wrap.WrapMode(WrapMode.Both); })
                                    .EditSettings(edit => { edit.AllowEditing().EditMode(EditMode.Batch); })
                                    .Columns(col =>
                                        col.Field(p => p.StarId).IsPrimaryKey(true).IsIdentity(true).Visible(false).Add();
                                        col.Field(p => p.CaseWorkId).Visible(false).Add();
                                        col.Field(p => p.SubjectPersonId).Visible(false).Add();
                                        col.Field(p => p.DomainArea).Width(20).AllowEditing(false).Add();
                                        col.Field(p => p.DomainAttribute).Width(40).AllowEditing(false).Add();
                                        col.Field(p => p.CurrentScore).Width(20).DataSource(Model.First().FamilyScore)
                                        col.Field(p => p.OriginalScore).Width(20).DataSource(Model.First().FamilyScore)

                                        col.Field(p => p.StarContext).EditTemplate(a => { a.Create("createML"); }).ValidationRules(v => v.AddRule("required", true)).Width(140).Add();
                                        //Syncfusion date format in grid needs to be dd-MMM-yyyy as there is an issue with validation when date set to dd/MM/yyyy
                                        col.Field(p => p.PresentedDate).EditType(EditingType.Datepicker)
                                            .ValidationRules(rule => rule.AddRule("dateFormat", "#PresentedDate"))
                                            .DateEditOptions(new DatePickerProperties { DateFormat = "dd-MMM-yyyy" })
                                    .ClientSideEvents(e => { e.CellEdit("onActionComplete"); })
    /*.e-rowcell {        
        word-wrap:break-word !important;

    .e-grid {
        overflow-y:auto !important;
    function createML() {
        return "<textarea class='form-control starcontext' rows='1' cols='140' style='word-wrap:break-word !important;' >{{:StarContext}}</textarea>";

Thavasianand Sankaranarayanan [Syncfusion]
Replied On July 21, 2017 03:37 AM UTC

Hi Dongil, 

Thanks for contacting Syncfusion support. 

We have analyzed your query and we suspect that you want use enter key in text area as new line navigator and also if we press enter in the Grid edit form then it will go for batch update. We suggest you to use Shift+Enter key in text area for navigate to new line. If we press Enter key alone then it will go for batch update. 

If we misunderstood your query then please get back to us. 

Thavasianand S. 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon