Thanks for using Syncfusion products.
Query: “Is there any way to get the row data from which the user double click?”
Yes, the row data from which the user double click can be received by using the event RecordDoubleClick. In this event, we can able to get the selected cell in arguments. So, using jQuery parent method we will be able to get the row data.
Please refer the following code example:
@(Html.EJ().Grid<object>("Grid") .Datasource(ds => ds.URL("/api/Orders").Adaptor(AdaptorType.WebApiAdaptor)) .AllowSorting() .AllowPaging() .AllowTextWrap() .AllowResizing() .AllowSelection(false) .PageSettings(page => page.PageSize(10)) .EnableAltRow() .EditSettings(edit => { edit.AllowAdding().AllowDeleting().AllowEditing(); }) .ToolbarSettings(toolbar => { toolbar.ShowToolbar().ToolbarItems(items => { items.AddTool(ToolBarItems.Add); items.AddTool(ToolBarItems.Edit); items.AddTool(ToolBarItems.Delete); items.AddTool(ToolBarItems.Update); items.AddTool(ToolBarItems.Cancel); }); }) .Columns(cols => { cols.Field("OrderID").IsPrimaryKey(true).Width(70).Add(); cols.Field("EmployeeID").IsPrimaryKey(true).Width(100).Add(); cols.Field("CustomerID").Width(90).Add(); cols.Field("Freight").Width(70).Format("{0:C}").Add(); cols.Field("ShipCountry").Width(60).Add(); }) .ClientSideEvents(evt => evt.RecordDoubleClick("recordDoubleClick")) ) |
Yes, it is possible to set the width in the view. We can able to set the width in the columns API. Please refer the above code example:
For your reference, we have created a sample and same can be downloaded from the below link:
Sample Link : http://www.syncfusion.com/downloads/support/forum/119422/ze/WebApiSample_Modified-607651259
Please let me know if you need any further assistance.
Regards,
Prasanna Kumar N.S.V