kendo grid select cell data on focus

Corey Witherow

Is there a way to highlight (select all the text) in a cell inside a Kendo Grid when focus is on the cell? When I tab or click into the columns I would like the text in that cell to auto highlight. Thank you in advance for any assistance.

I have the below code:

@(Html.Kendo().Grid<ExerciseBreakdownViewModel>()
          .Name(string.Format("Grid"))
          .Columns(columns =>
          {
              columns.Bound(p => p.Id).Visible(false);
              columns.Bound(p => p.PersonnelName).Width(120);
              columns.Bound(p => p.NumberOfTeams).Width(120);
              columns.Bound(p => p.TeamMembers).Width(110);
              columns.Bound(p => p.Vehicles).Width(80);
              columns.Bound(p => p.Brief).Format("{0:HH:mm}").EditorTemplateName("BriefTimePicker").Width(80);
              columns.Bound(p => p.KickOff).Format("{0:HH:mm}").EditorTemplateName("KickoffTimePicker").Width(80);
              columns.Bound(p => p.Debrief).Format("{0:HH:mm}").EditorTemplateName("DebriefTimePicker").Width(80);
          })
          .Editable(editable => editable.Mode(GridEditMode.InCell))
          .HtmlAttributes(new { style = "height:400px;" })
          .Navigatable()
          .Scrollable()
          .DataSource(dataSource => dataSource
              .Ajax()
              .PageSize(20)
              .Events(events => events.Error("error_handler"))
              .Model(model =>
              {
                  model.Id(p => p.Id);
                  model.Field(p => p.PersonnelName).Editable(false);
                  model.Field(p => p.NumberOfTeams);
                  model.Field(p => p.TeamMembers);
                  model.Field(p => p.Vehicles);
                  model.Field(p => p.Brief);
                  model.Field(p => p.KickOff);
                  model.Field(p => p.Debrief);
              })
             .Read("Personnel_Read", "Schedule", Model)
          )
    )
CSharper

Add an Edit event to your grid. .Events(x => x.Edit("edit"))

function edit(e) {

    var input = e.container.find("input");      
        input.select();       
}

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

how to focus next cell in kendo grid by enter

From Dev

how to focus next cell in kendo grid by enter

From Dev

Kendo grid change style cell data

From Dev

How to open a kendo Pop Up window when a particular kendo grid column cell is in focus?

From Dev

How to open a kendo Pop Up window when a particular kendo grid column cell is in focus?

From Dev

Kendo UI Grid select by data item

From Dev

Kendo Grid: How to set focus back to a grid cell after canceling current editing

From Dev

Kendo Grid: How to set focus back to a grid cell after canceling current editing

From Dev

Kendo Grid Filterable cell

From Dev

Kendo Grid Filterable cell

From Dev

Clickable Cell in Kendo Grid

From Dev

Accessing kendo grid cell values

From Dev

Kendo grid editable multiselect grid cell

From Dev

data not populating in kendo grid

From Dev

How do I display Kendo Grid inside Kendo Grid cell?

From Dev

Kendo UI Grid: Select single cell, get back DataItem, and prevent specific cells from being selected?

From Dev

Select programmatically Kendo grid row

From Dev

How to select checkbox at kendo grid?

From Dev

Angular UI Grid set focus to cell on navigate

From Dev

Show dropdown in cell of kendo grid in template

From Dev

How to show € symbol in a kendo grid cell

From Dev

how to get cell click event in kendo grid

From Dev

Make cell readonly in Kendo Grid if condition is met

From Dev

Kendo Grid: Removing dirty cell indicators

From Dev

Kendo grid cell refocusing after refresh

From Dev

Styling cell in Kendo grid via ClientTemplate

From Dev

Remote update cell content in kendo grid

From Dev

Kendo UI grid filter cell that contains an array

From Dev

Kendo UI grid conditionally editable cell

Related Related

HotTag

Archive