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.
Unfortunately, activation email could not send to your email. Please try again.

How to allow copying of cell data in ASP.NET MVC

Thread ID:





132019 Aug 8,2017 01:34 PM Aug 9,2017 09:54 PM ASP.NET MVC 1
Tags: Grid
Colin Webber
Asked On August 8, 2017 01:34 PM

I have the following Grid written in ASP.NET MVC and can not for the life of me figure out how to enable the copying of cell data in the current configuration. Any help would be greatly appreciated.
          .Datasource(ds => ds.URL("/Order/GetMPOrders").Adaptor("UrlAdaptor"))
          .ScrollSettings(scroll => scroll.Height("auto").Width("auto"))
          .SelectionSettings(select =>
              select.CellSelectionMode(CellSelectionMode.Box).SelectionMode(new List<SelectionMode>() { SelectionMode.Cell });
          .EditSettings(edit => { edit.AllowAdding().AllowDeleting(); })
          .SortSettings(sort =>
              sort.SortedColumns(col => col.Field("OrderDate").Direction(SortOrder.Descending).Add());
              sort.SortedColumns(col => col.Field("InternalOrderID").Direction(SortOrder.Descending).Add());
          .Columns(col =>
              col.Field(c => c.IntegrationOrderId).IsPrimaryKey(true);
              col.Field(c => c.ExternalSystemName).HeaderText("External System").TextAlign(TextAlign.Left).Width(125).Add();
              col.Field(c => c.InternalOrderID).HeaderText("System Order ID").TextAlign(TextAlign.Left).Width(125).Add();
              col.Field(c => c.ERPOrderNumber).HeaderText("MAS Order Number").TextAlign(TextAlign.Left).Width(125).Add();
              col.Field(c => c.OrderStatus).HeaderText("Order Status").TextAlign(TextAlign.Left).Width(125).Add();
              col.Field(c => c.OrderTrackingNumber).HeaderText("Tracking Number").TextAlign(TextAlign.Left).Width(125).Add();
              col.Field(c => c.OrderDate).HeaderText("Order Date").Format("{0:MM/dd/yyyy}").TextAlign(TextAlign.Left).Width(125).Add();
              col.Field(c => c.OrderTotalPrice).Format("{0:C}").HeaderText("Order Total").TextAlign(TextAlign.Right).Width(125).Add();
              col.Field(c => c.LastUpdated).Format("{0:MM/dd/yyyy}").HeaderText("Last Updated").TextAlign(TextAlign.Left).Width(125).Add();
          .ClientSideEvents(eve => eve.QueryCellInfo("checkIssueStatus")

Prasanna Kumar Viswanathan [Syncfusion]
Replied On August 9, 2017 09:54 PM

Hi Colin, 

Thanks for contacting Syncfusion support. 

By default, user-select property will be set to none in the ejGrid. If you would like to disable this, you must override this property in the Grid. This can be achieved by using the CssClass property of the Grid. 

Find the code example and sample:  

    .Columns(col => 
    .e-grid.copyText .e-rowcell { 
        -moz-user-select: inherit; 
        -khtml-user-select: inherit; 
        -webkit-user-select: text; 
        -ms-user-select: inherit; 
        user-select: inherit; 

Prasanna Kumar N.S.V 


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.

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.